diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-26 15:00:02 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-26 15:00:09 +0200 |
commit | 05a6a71aef5f9aca56508df054c5ea35a748f30c (patch) | |
tree | 2a6691f8bc2217d73fc06795c4ece1d95eb2cdd1 /db/migrate | |
parent | 7da7af3a22058a6fb4e22cbf2b659e910cc92d54 (diff) | |
download | gitlab-ce-05a6a71aef5f9aca56508df054c5ea35a748f30c.tar.gz |
Add index on deployable_type/id for deployments
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb b/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb new file mode 100644 index 00000000000..a0e3a228f6c --- /dev/null +++ b/db/migrate/20180626125654_add_index_on_deployable_for_deployments.rb @@ -0,0 +1,18 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddIndexOnDeployableForDeployments < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :deployments, [:deployable_type, :deployable_id] + end + + def down + remove_concurrent_index :deployments, [:deployable_type, :deployable_id] + end +end |