Merge pull request #6140 from betagouv/main

2021-04-27-02
This commit is contained in:
Pierre de La Morinerie 2021-04-27 17:27:15 +02:00 committed by GitHub
commit 78b5c6d32f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,10 +5,12 @@ class AddUniqueIndexToIndividuals < ActiveRecord::Migration[6.1]
def up def up
delete_duplicates :individuals, [:dossier_id] delete_duplicates :individuals, [:dossier_id]
remove_index :individuals, [:dossier_id]
add_concurrent_index :individuals, [:dossier_id], unique: true add_concurrent_index :individuals, [:dossier_id], unique: true
end end
def down def down
remove_index :individuals, [:dossier_id] remove_index :individuals, [:dossier_id], unique: true
add_concurrent_index :individuals, [:dossier_id]
end end
end end