2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-11-30 14:47:19 +01:00
|
|
|
class MoveProcessExpireToProcedures < ActiveRecord::Migration[6.1]
|
|
|
|
include Database::MigrationHelpers
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_column :procedures, :procedure_expires_when_termine_enabled, :boolean, default: false
|
|
|
|
add_column :traitements, :process_expired_migrated, :boolean, default: false
|
|
|
|
add_concurrent_index :procedures, :procedure_expires_when_termine_enabled
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :procedures, name: :index_procedures_on_process_expired
|
|
|
|
remove_column :traitements, :process_expired_migrated
|
|
|
|
remove_column :procedures, :procedure_expires_when_termine_enabled
|
|
|
|
end
|
|
|
|
end
|