2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-01-10 13:37:55 +01:00
|
|
|
class AddVersionToAttestationTemplates < ActiveRecord::Migration[7.0]
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def change
|
|
|
|
add_column :attestation_templates, :version, :integer, default: 1, null: false
|
|
|
|
add_index :attestation_templates, [:procedure_id, :version], unique: true, algorithm: :concurrently
|
|
|
|
remove_index :attestation_templates, :procedure_id, unique: true, algorithm: :concurrently
|
|
|
|
end
|
|
|
|
end
|