diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 18:08:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 18:08:35 +0000 |
commit | 6315ed9630fb1c6ade3114beb762cd1568d79219 (patch) | |
tree | 2a5d31936d09c14420c8f4c8bd752e268f0eb19f /db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb | |
parent | fedf978f9aa1909ed7bb3fad767ad120a1c6bd7b (diff) | |
download | gitlab-ce-6315ed9630fb1c6ade3114beb762cd1568d79219.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb')
-rw-r--r-- | db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb b/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb new file mode 100644 index 00000000000..67dedb56ec1 --- /dev/null +++ b/db/migrate/20200117194840_add_index_on_operations_feature_flags_iid.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnOperationsFeatureFlagsIid < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :operations_feature_flags, [:project_id, :iid], unique: true + end + + def down + remove_concurrent_index :operations_feature_flags, [:project_id, :iid] + end +end |