blob: 5c69fc6d9fe8233d86a4f7ea71cae7b5d30dd2b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class RemoveUniqueSoftwareLicensePoliciesIndexOnProject < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'index_software_license_policies_unique_per_project'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :software_license_policies, INDEX_NAME
end
def down
add_concurrent_index :software_license_policies, [:project_id, :software_license_id], unique: true, name: INDEX_NAME
end
end
|