demarches-normaliennes/db/migrate/20230928083809_remove_exports_unicity_constraint.rb
2024-08-22 09:26:48 +02:00

11 lines
309 B
Ruby

# frozen_string_literal: true
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