diff options
Diffstat (limited to 'db/migrate/20190606054832_add_index_to_operations_feature_flags_clients_token_encrypted.rb')
-rw-r--r-- | db/migrate/20190606054832_add_index_to_operations_feature_flags_clients_token_encrypted.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20190606054832_add_index_to_operations_feature_flags_clients_token_encrypted.rb b/db/migrate/20190606054832_add_index_to_operations_feature_flags_clients_token_encrypted.rb new file mode 100644 index 00000000000..5627457af5c --- /dev/null +++ b/db/migrate/20190606054832_add_index_to_operations_feature_flags_clients_token_encrypted.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddIndexToOperationsFeatureFlagsClientsTokenEncrypted < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :operations_feature_flags_clients, [:project_id, :token_encrypted], + unique: true, name: "index_feature_flags_clients_on_project_id_and_token_encrypted" + end + + def down + remove_concurrent_index_by_name :operations_feature_flags_clients, "index_feature_flags_clients_on_project_id_and_token_encrypted" + end +end |