diff options
Diffstat (limited to 'db/post_migrate')
4 files changed, 12 insertions, 12 deletions
diff --git a/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb b/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb index 489a158ea3a..924ca73e6cc 100644 --- a/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb +++ b/db/post_migrate/20200608203426_set_proper_lock_version_indices.rb @@ -12,9 +12,9 @@ class SetProperLockVersionIndices < ActiveRecord::Migration[6.0] remove_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" remove_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" - add_concurrent_index :epics, :id, where: "lock_version IS NULL" - add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL" - add_concurrent_index :issues, :id, where: "lock_version IS NULL" + add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' + add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' + add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' end def down @@ -22,8 +22,8 @@ class SetProperLockVersionIndices < ActiveRecord::Migration[6.0] add_concurrent_index :merge_requests, :lock_version, where: "lock_version IS NULL" add_concurrent_index :issues, :lock_version, where: "lock_version IS NULL" - remove_concurrent_index :epics, :id, where: "lock_version IS NULL" - remove_concurrent_index :merge_requests, :id, where: "lock_version IS NULL" - remove_concurrent_index :issues, :id, where: "lock_version IS NULL" + remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' + remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' + remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' end end diff --git a/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb b/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb index 2c319be37a3..aafa6a83200 100644 --- a/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb +++ b/db/post_migrate/20200608212030_lock_version_cleanup_for_epics.rb @@ -9,10 +9,10 @@ class LockVersionCleanupForEpics < ActiveRecord::Migration[6.0] def up validate_not_null_constraint :epics, :lock_version - remove_concurrent_index :epics, :id, where: "lock_version IS NULL" + remove_concurrent_index_by_name :epics, name: 'index_epics_on_id' end def down - add_concurrent_index :epics, :id, where: "lock_version IS NULL" + add_concurrent_index :epics, :id, where: "lock_version IS NULL", name: 'index_epics_on_id' end end diff --git a/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb b/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb index 2606016b8a9..cb8ab86b6a3 100644 --- a/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb +++ b/db/post_migrate/20200608212435_lock_version_cleanup_for_merge_requests.rb @@ -9,10 +9,10 @@ class LockVersionCleanupForMergeRequests < ActiveRecord::Migration[6.0] def up validate_not_null_constraint :merge_requests, :lock_version - remove_concurrent_index :merge_requests, :id, where: "lock_version IS NULL" + remove_concurrent_index_by_name :merge_requests, name: 'index_merge_requests_on_id' end def down - add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL" + add_concurrent_index :merge_requests, :id, where: "lock_version IS NULL", name: 'index_merge_requests_on_id' end end diff --git a/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb b/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb index 54de3ac8000..ad3fea8b131 100644 --- a/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb +++ b/db/post_migrate/20200608212549_lock_version_cleanup_for_issues.rb @@ -9,10 +9,10 @@ class LockVersionCleanupForIssues < ActiveRecord::Migration[6.0] def up validate_not_null_constraint :issues, :lock_version - remove_concurrent_index :issues, :id, where: "lock_version IS NULL" + remove_concurrent_index_by_name :issues, name: 'index_issues_on_id' end def down - add_concurrent_index :issues, :id, where: "lock_version IS NULL" + add_concurrent_index :issues, :id, where: "lock_version IS NULL", name: 'index_issues_on_id' end end |