demarches-normaliennes/db/migrate/20230928083809_remove_exports_unicity_constraint.rb
Colin Darie de7d60e18e
chore(schema): remove exports unicity constraint
Co-Authored-By: Lisa Durand <lisa.c.durand@gmail.com>
2023-09-28 15:23:28 +02:00

9 lines
278 B
Ruby

class RemoveExportsUnicityConstraint < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
remove_index :exports, ["format", "time_span_type", "statut", "key"], unique: true
add_index :exports, "key", unique: false, algorithm: :concurrently
end
end