Merge pull request #6139 from betagouv/fix-migration

Correction de la migration des Individuals (#6139)
This commit is contained in:
Pierre de La Morinerie 2021-04-27 17:06:57 +02:00 committed by GitHub
commit 959026ca4f
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
delete_duplicates :individuals, [:dossier_id]
remove_index :individuals, [:dossier_id]
add_concurrent_index :individuals, [:dossier_id], unique: true
end
def down
remove_index :individuals, [:dossier_id]
remove_index :individuals, [:dossier_id], unique: true
add_concurrent_index :individuals, [:dossier_id]
end
end