Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-25 11:59:23 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-07-25 12:47:12 +0300
commitb95da565cd91fff0729fb4bf6632fb6224de8843 (patch)
treebc2fb2fe99f42b2aae6ff9ed6557366c7959d7b4 /db/optional_migrations
parent068768e1f8b64f7de4fe18b094e7f2e7555c9398 (diff)
Enable rubocop for db/**/* and ee/db/**/*
Diffstat (limited to 'db/optional_migrations')
-rw-r--r--db/optional_migrations/composite_primary_keys.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/db/optional_migrations/composite_primary_keys.rb b/db/optional_migrations/composite_primary_keys.rb
index 0fd3fca52dd..d45705021b0 100644
--- a/db/optional_migrations/composite_primary_keys.rb
+++ b/db/optional_migrations/composite_primary_keys.rb
@@ -21,8 +21,8 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
Index.new(:merge_request_diff_commits, 'index_merge_request_diff_commits_on_mr_diff_id_and_order', %i(merge_request_diff_id relative_order)),
Index.new(:project_authorizations, 'index_project_authorizations_on_user_id_project_id_access_level', %i(user_id project_id access_level)),
Index.new(:push_event_payloads, 'index_push_event_payloads_on_event_id', %i(event_id)),
- Index.new(:schema_migrations, 'unique_schema_migrations', %(version)),
- ]
+ Index.new(:schema_migrations, 'unique_schema_migrations', %(version))
+ ].freeze
disable_ddl_transaction!
@@ -45,6 +45,7 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
end
private
+
def add_primary_key(index)
execute "ALTER TABLE #{index.table} ADD PRIMARY KEY USING INDEX #{index.name}"
end
@@ -60,4 +61,3 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
execute "ALTER TABLE #{index.table} DROP CONSTRAINT IF EXISTS #{temp_index_name}"
end
end
-