From 40ad7d5d7a01a6f019ce1c3bb8864b16fc48e9c8 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 12 Dec 2018 16:38:40 +0100 Subject: Fix ActiveRecord::Migration deprecations Extending from ActiveRecord::Migration is deprecated, but was still used in a bunch of places. --- ...01191341_create_clusters_applications_cert_manager.rb | 2 +- .../20181108091549_cleanup_environments_external_url.rb | 2 +- ...1115140140_add_encrypted_runners_token_to_settings.rb | 2 +- db/migrate/20181116050532_knative_external_ip.rb | 2 +- ...16141415_add_encrypted_runners_token_to_namespaces.rb | 2 +- ...1116141504_add_encrypted_runners_token_to_projects.rb | 2 +- ...0181119081539_add_merge_request_id_to_ci_pipelines.rb | 2 +- ...639_add_foreign_key_to_ci_pipelines_merge_requests.rb | 2 +- .../20181120151656_add_token_encrypted_to_ci_runners.rb | 2 +- ...d_ci_builds_partial_index_on_project_id_and_status.rb | 2 +- ...121101843_remove_redundant_ci_builds_partial_index.rb | 2 +- ...010133639_backfill_store_project_full_path_in_repo.rb | 2 +- .../20181026091631_migrate_forbidden_redirect_uris.rb | 2 +- .../20181121111200_schedule_runners_token_encryption.rb | 2 +- doc/development/background_migrations.md | 4 ++-- doc/development/migration_style_guide.md | 16 ++++++++-------- doc/development/prometheus_metrics.md | 2 +- doc/development/sql.md | 4 ++-- doc/development/what_requires_downtime.md | 14 +++++++------- spec/rubocop/cop/migration/add_timestamps_spec.rb | 6 +++--- spec/rubocop/cop/migration/datetime_spec.rb | 8 ++++---- spec/rubocop/cop/migration/timestamps_spec.rb | 6 +++--- spec/support/helpers/fake_migration_classes.rb | 2 +- 23 files changed, 45 insertions(+), 45 deletions(-) diff --git a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb index 4966b89964a..0b6155356d9 100644 --- a/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb +++ b/db/migrate/20181101191341_create_clusters_applications_cert_manager.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CreateClustersApplicationsCertManager < ActiveRecord::Migration +class CreateClustersApplicationsCertManager < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181108091549_cleanup_environments_external_url.rb b/db/migrate/20181108091549_cleanup_environments_external_url.rb index 8d6c20a4b15..8439f6e55e6 100644 --- a/db/migrate/20181108091549_cleanup_environments_external_url.rb +++ b/db/migrate/20181108091549_cleanup_environments_external_url.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CleanupEnvironmentsExternalUrl < ActiveRecord::Migration +class CleanupEnvironmentsExternalUrl < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181115140140_add_encrypted_runners_token_to_settings.rb b/db/migrate/20181115140140_add_encrypted_runners_token_to_settings.rb index 36d9ad45b19..5b2bb4f6b08 100644 --- a/db/migrate/20181115140140_add_encrypted_runners_token_to_settings.rb +++ b/db/migrate/20181115140140_add_encrypted_runners_token_to_settings.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddEncryptedRunnersTokenToSettings < ActiveRecord::Migration +class AddEncryptedRunnersTokenToSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181116050532_knative_external_ip.rb b/db/migrate/20181116050532_knative_external_ip.rb index f1f903fb692..5645b040a23 100644 --- a/db/migrate/20181116050532_knative_external_ip.rb +++ b/db/migrate/20181116050532_knative_external_ip.rb @@ -3,7 +3,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class KnativeExternalIp < ActiveRecord::Migration +class KnativeExternalIp < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181116141415_add_encrypted_runners_token_to_namespaces.rb b/db/migrate/20181116141415_add_encrypted_runners_token_to_namespaces.rb index b92b1b50218..dcf565cd6c0 100644 --- a/db/migrate/20181116141415_add_encrypted_runners_token_to_namespaces.rb +++ b/db/migrate/20181116141415_add_encrypted_runners_token_to_namespaces.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddEncryptedRunnersTokenToNamespaces < ActiveRecord::Migration +class AddEncryptedRunnersTokenToNamespaces < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb b/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb index 53e475bd180..13cd80e5c8b 100644 --- a/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb +++ b/db/migrate/20181116141504_add_encrypted_runners_token_to_projects.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddEncryptedRunnersTokenToProjects < ActiveRecord::Migration +class AddEncryptedRunnersTokenToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181119081539_add_merge_request_id_to_ci_pipelines.rb b/db/migrate/20181119081539_add_merge_request_id_to_ci_pipelines.rb index 65476109c61..f96d80787f9 100644 --- a/db/migrate/20181119081539_add_merge_request_id_to_ci_pipelines.rb +++ b/db/migrate/20181119081539_add_merge_request_id_to_ci_pipelines.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddMergeRequestIdToCiPipelines < ActiveRecord::Migration +class AddMergeRequestIdToCiPipelines < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb b/db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb index 03f677a4678..f8b46395941 100644 --- a/db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb +++ b/db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddForeignKeyToCiPipelinesMergeRequests < ActiveRecord::Migration +class AddForeignKeyToCiPipelinesMergeRequests < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181120151656_add_token_encrypted_to_ci_runners.rb b/db/migrate/20181120151656_add_token_encrypted_to_ci_runners.rb index 40db6b399ab..8b990451adc 100644 --- a/db/migrate/20181120151656_add_token_encrypted_to_ci_runners.rb +++ b/db/migrate/20181120151656_add_token_encrypted_to_ci_runners.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class AddTokenEncryptedToCiRunners < ActiveRecord::Migration +class AddTokenEncryptedToCiRunners < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181121101842_add_ci_builds_partial_index_on_project_id_and_status.rb b/db/migrate/20181121101842_add_ci_builds_partial_index_on_project_id_and_status.rb index 5b47a279438..a524709faf8 100644 --- a/db/migrate/20181121101842_add_ci_builds_partial_index_on_project_id_and_status.rb +++ b/db/migrate/20181121101842_add_ci_builds_partial_index_on_project_id_and_status.rb @@ -3,7 +3,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddCiBuildsPartialIndexOnProjectIdAndStatus < ActiveRecord::Migration +class AddCiBuildsPartialIndexOnProjectIdAndStatus < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20181121101843_remove_redundant_ci_builds_partial_index.rb b/db/migrate/20181121101843_remove_redundant_ci_builds_partial_index.rb index a0a02e81323..e4fb703e887 100644 --- a/db/migrate/20181121101843_remove_redundant_ci_builds_partial_index.rb +++ b/db/migrate/20181121101843_remove_redundant_ci_builds_partial_index.rb @@ -3,7 +3,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveRedundantCiBuildsPartialIndex < ActiveRecord::Migration +class RemoveRedundantCiBuildsPartialIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20181010133639_backfill_store_project_full_path_in_repo.rb b/db/post_migrate/20181010133639_backfill_store_project_full_path_in_repo.rb index e9ab45ae9a1..247f5980f7e 100644 --- a/db/post_migrate/20181010133639_backfill_store_project_full_path_in_repo.rb +++ b/db/post_migrate/20181010133639_backfill_store_project_full_path_in_repo.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class BackfillStoreProjectFullPathInRepo < ActiveRecord::Migration +class BackfillStoreProjectFullPathInRepo < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20181026091631_migrate_forbidden_redirect_uris.rb b/db/post_migrate/20181026091631_migrate_forbidden_redirect_uris.rb index ff5510e8eb7..7c2df832882 100644 --- a/db/post_migrate/20181026091631_migrate_forbidden_redirect_uris.rb +++ b/db/post_migrate/20181026091631_migrate_forbidden_redirect_uris.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class MigrateForbiddenRedirectUris < ActiveRecord::Migration +class MigrateForbiddenRedirectUris < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb b/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb index 753e052f7a7..ba82072fc98 100644 --- a/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb +++ b/db/post_migrate/20181121111200_schedule_runners_token_encryption.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ScheduleRunnersTokenEncryption < ActiveRecord::Migration +class ScheduleRunnersTokenEncryption < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/doc/development/background_migrations.md b/doc/development/background_migrations.md index bb9a296ef12..dd4a9e058d7 100644 --- a/doc/development/background_migrations.md +++ b/doc/development/background_migrations.md @@ -211,7 +211,7 @@ existing data. Since we're dealing with a lot of rows we'll schedule jobs in batches instead of doing this one by one: ```ruby -class ScheduleExtractServicesUrl < ActiveRecord::Migration +class ScheduleExtractServicesUrl < ActiveRecord::Migration[4.2] disable_ddl_transaction! class Service < ActiveRecord::Base @@ -242,7 +242,7 @@ jobs and manually run on any un-migrated rows. Such a migration would look like this: ```ruby -class ConsumeRemainingExtractServicesUrlJobs < ActiveRecord::Migration +class ConsumeRemainingExtractServicesUrlJobs < ActiveRecord::Migration[4.2] disable_ddl_transaction! class Service < ActiveRecord::Base diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index a99267bfbba..d0a054c3290 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -67,7 +67,7 @@ body: For example: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = 'This migration requires downtime because ...' @@ -95,7 +95,7 @@ migration. For this to work your migration needs to include the module `Gitlab::Database::MultiThreadedMigration`: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::Database::MultiThreadedMigration end @@ -105,7 +105,7 @@ You can then use the method `with_multiple_threads` to perform work in separate threads. For example: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::Database::MultiThreadedMigration @@ -139,7 +139,7 @@ by calling the method `disable_ddl_transaction!` in the body of your migration class like so: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -167,7 +167,7 @@ the method `disable_ddl_transaction!` in the body of your migration class like so: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -193,7 +193,7 @@ Here's an example where we add a new column with a foreign key constraint. Note it includes `index: true` to create an index for it. ```ruby -class Migration < ActiveRecord::Migration +class Migration < ActiveRecord::Migration[4.2] def change add_reference :model, :other_model, index: true, foreign_key: { on_delete: :cascade } @@ -216,7 +216,7 @@ For example, to add the column `foo` to the `projects` table with a default value of `10` you'd write the following: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -365,7 +365,7 @@ If you need more complex logic you can define and use models local to a migration. For example: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] class Project < ActiveRecord::Base self.table_name = 'projects' end diff --git a/doc/development/prometheus_metrics.md b/doc/development/prometheus_metrics.md index b6b6d9665ea..0511e735843 100644 --- a/doc/development/prometheus_metrics.md +++ b/doc/development/prometheus_metrics.md @@ -30,7 +30,7 @@ You might want to add additional database migration that makes a decision what t For example: you might be interested in migrating all dependent data to a different metric. ```ruby -class ImportCommonMetrics < ActiveRecord::Migration +class ImportCommonMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers require Rails.root.join('db/importers/common_metrics_importer.rb') diff --git a/doc/development/sql.md b/doc/development/sql.md index e1e1d31a85f..06005a0a6f8 100644 --- a/doc/development/sql.md +++ b/doc/development/sql.md @@ -106,7 +106,7 @@ transaction. Transactions for migrations can be disabled using the following pattern: ```ruby -class MigrationName < ActiveRecord::Migration +class MigrationName < ActiveRecord::Migration[4.2] disable_ddl_transaction! end ``` @@ -114,7 +114,7 @@ end For example: ```ruby -class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration +class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md index 3630a28fae9..24edd05da2f 100644 --- a/doc/development/what_requires_downtime.md +++ b/doc/development/what_requires_downtime.md @@ -88,7 +88,7 @@ renaming. For example ```ruby # A regular migration in db/migrate -class RenameUsersUpdatedAtToUpdatedAtTimestamp < ActiveRecord::Migration +class RenameUsersUpdatedAtToUpdatedAtTimestamp < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -118,7 +118,7 @@ We can perform this cleanup using ```ruby # A post-deployment migration in db/post_migrate -class CleanupUsersUpdatedAtRename < ActiveRecord::Migration +class CleanupUsersUpdatedAtRename < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -157,7 +157,7 @@ as follows: ```ruby # A regular migration in db/migrate -class ChangeUsersUsernameStringToText < ActiveRecord::Migration +class ChangeUsersUsernameStringToText < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -178,7 +178,7 @@ Next we need to clean up our changes using a post-deployment migration: ```ruby # A post-deployment migration in db/post_migrate -class ChangeUsersUsernameStringToTextCleanup < ActiveRecord::Migration +class ChangeUsersUsernameStringToTextCleanup < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -213,7 +213,7 @@ the work / load over a longer time period, without slowing down deployments. For example, to change the column type using a background migration: ```ruby -class ExampleMigration < ActiveRecord::Migration +class ExampleMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! @@ -257,7 +257,7 @@ release) by a cleanup migration, which should steal from the queue and handle any remaining rows. For example: ```ruby -class MigrateRemainingIssuesClosedAt < ActiveRecord::Migration +class MigrateRemainingIssuesClosedAt < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false @@ -322,7 +322,7 @@ Migrations can take advantage of this by using the method `add_concurrent_index`. For example: ```ruby -class MyMigration < ActiveRecord::Migration +class MyMigration < ActiveRecord::Migration[4.2] def up add_concurrent_index :projects, :column_name end diff --git a/spec/rubocop/cop/migration/add_timestamps_spec.rb b/spec/rubocop/cop/migration/add_timestamps_spec.rb index 3a41c91add2..fae0177d5f5 100644 --- a/spec/rubocop/cop/migration/add_timestamps_spec.rb +++ b/spec/rubocop/cop/migration/add_timestamps_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do subject(:cop) { described_class.new } let(:migration_with_add_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -24,7 +24,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do let(:migration_without_add_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -36,7 +36,7 @@ describe RuboCop::Cop::Migration::AddTimestamps do let(:migration_with_add_timestamps_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/rubocop/cop/migration/datetime_spec.rb b/spec/rubocop/cop/migration/datetime_spec.rb index 9e844325371..f2d9483d8d3 100644 --- a/spec/rubocop/cop/migration/datetime_spec.rb +++ b/spec/rubocop/cop/migration/datetime_spec.rb @@ -12,7 +12,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_datetime) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -25,7 +25,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_timestamp) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -38,7 +38,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_without_datetime) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -50,7 +50,7 @@ describe RuboCop::Cop::Migration::Datetime do let(:migration_with_datetime_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/rubocop/cop/migration/timestamps_spec.rb b/spec/rubocop/cop/migration/timestamps_spec.rb index 685bdb21803..1812818692a 100644 --- a/spec/rubocop/cop/migration/timestamps_spec.rb +++ b/spec/rubocop/cop/migration/timestamps_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Migration::Timestamps do subject(:cop) { described_class.new } let(:migration_with_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -27,7 +27,7 @@ describe RuboCop::Cop::Migration::Timestamps do let(:migration_without_timestamps) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change @@ -42,7 +42,7 @@ describe RuboCop::Cop::Migration::Timestamps do let(:migration_with_timestamps_with_timezone) do %q( - class Users < ActiveRecord::Migration + class Users < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/spec/support/helpers/fake_migration_classes.rb b/spec/support/helpers/fake_migration_classes.rb index b0fc8422857..c7766df7a52 100644 --- a/spec/support/helpers/fake_migration_classes.rb +++ b/spec/support/helpers/fake_migration_classes.rb @@ -1,4 +1,4 @@ -class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration +class FakeRenameReservedPathMigrationV1 < ActiveRecord::Migration[4.2] include Gitlab::Database::RenameReservedPathsMigration::V1 def version -- cgit v1.2.1 From 25ea6fdd5ee723dbe98b719c9966b19668cb7cda Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 12 Dec 2018 17:11:23 +0100 Subject: Fix deprecations in opclasses initializer The use of `table_exists?` in the opclasses support initializer triggers a deprecation warning. Using `data_source_exists?` removes this deprecation. --- config/initializers/postgresql_opclasses_support.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/postgresql_opclasses_support.rb b/config/initializers/postgresql_opclasses_support.rb index 07b06629dea..5d643b75dd8 100644 --- a/config/initializers/postgresql_opclasses_support.rb +++ b/config/initializers/postgresql_opclasses_support.rb @@ -81,7 +81,7 @@ module ActiveRecord if index_name.length > max_index_length raise ArgumentError, "Index name '#{index_name}' on table '#{table_name}' is too long; the limit is #{max_index_length} characters" end - if table_exists?(table_name) && index_name_exists?(table_name, index_name, false) + if data_source_exists?(table_name) && index_name_exists?(table_name, index_name, false) raise ArgumentError, "Index name '#{index_name}' on table '#{table_name}' already exists" end index_columns = quoted_columns_for_index(column_names, options).join(", ") -- cgit v1.2.1