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

12 lines
415 B
Ruby

# frozen_string_literal: true
class CreateDossierBatchOperations < ActiveRecord::Migration[6.1]
def change
create_table :dossier_batch_operations do |t|
t.references :dossier, null: false, foreign_key: true
t.references :batch_operation, null: false, foreign_key: true
t.string :state, null: false, default: DossierBatchOperation.states.fetch(:pending)
t.timestamps
end
end
end