diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-21 09:27:07 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-21 09:27:07 +0100 |
commit | e79784b79a00507d9b16be52ea01465f6b0be7ff (patch) | |
tree | 2ef27bf45e86531b4f5a56f6da43e5c9c6dbd08b /db | |
parent | 2f3f9a6bb0b4777146eb1ccc33ba14910cbd4746 (diff) | |
download | gitlab-ce-e79784b79a00507d9b16be52ea01465f6b0be7ff.tar.gz |
Create index on id instead of stage_id in migration
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb | 6 | ||||
-rw-r--r-- | db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb b/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb index df62ddf36c7..e55e2e6f888 100644 --- a/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb +++ b/db/post_migrate/20180212101828_add_tmp_partial_null_index_to_builds.rb @@ -4,11 +4,11 @@ class AddTmpPartialNullIndexToBuilds < ActiveRecord::Migration disable_ddl_transaction! def up - add_concurrent_index(:ci_builds, :stage_id, where: 'stage_id IS NULL', - name: 'tmp_stage_id_partial_null_index') + add_concurrent_index(:ci_builds, :id, where: 'stage_id IS NULL', + name: 'tmp_id_partial_null_index') end def down - remove_concurrent_index_by_name(:ci_builds, 'tmp_stage_id_partial_null_index') + remove_concurrent_index_by_name(:ci_builds, 'tmp_id_partial_null_index') end end diff --git a/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb b/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb index 139097399a6..ed7b1fc72f4 100644 --- a/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb +++ b/db/post_migrate/20180212102028_remove_tmp_partial_null_index_from_builds.rb @@ -4,11 +4,11 @@ class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration disable_ddl_transaction! def up - remove_concurrent_index_by_name(:ci_builds, 'tmp_stage_id_partial_null_index') + remove_concurrent_index_by_name(:ci_builds, 'tmp_id_partial_null_index') end def down - add_concurrent_index(:ci_builds, :stage_id, where: 'stage_id IS NULL', - name: 'tmp_stage_id_partial_null_index') + add_concurrent_index(:ci_builds, :id, where: 'stage_id IS NULL', + name: 'tmp_id_partial_null_index') end end |