Commit 71ae5cb5 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '350731-unique-index-for-provider-data' into 'master'

Add unique index for security training providers

See merge request gitlab-org/gitlab!82235
parents 7b852ec8 8cfba7db
# frozen_string_literal: true
class AddUniqueIndexOnSecurityTrainingProviders < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_security_training_providers_on_unique_name'
disable_ddl_transaction!
def up
add_concurrent_index :security_training_providers, :name, unique: true, name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :security_training_providers, INDEX_NAME
end
end
d60a313ac68b0edfe1ae219690aacbe74c038b90bc4239f67d14f9ced36d67f6
\ No newline at end of file
......@@ -28957,6 +28957,8 @@ CREATE INDEX index_security_scans_on_pipeline_id ON security_scans USING btree (
CREATE INDEX index_security_scans_on_project_id ON security_scans USING btree (project_id);
CREATE UNIQUE INDEX index_security_training_providers_on_unique_name ON security_training_providers USING btree (name);
CREATE INDEX index_security_trainings_on_project_id ON security_trainings USING btree (project_id);
CREATE INDEX index_security_trainings_on_provider_id ON security_trainings USING btree (provider_id);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment