Merge pull request #6139 from betagouv/fix-migration
Correction de la migration des Individuals (#6139)
This commit is contained in:
commit
959026ca4f
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue