2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-07-22 14:34:07 +02:00
|
|
|
class CreateBulkMessageMails < ActiveRecord::Migration[6.1]
|
|
|
|
def change
|
|
|
|
create_table :bulk_messages do |t|
|
|
|
|
t.text :body, null: false
|
|
|
|
t.integer :dossier_count
|
|
|
|
t.string :dossier_state
|
|
|
|
t.datetime :sent_at, null: false
|
|
|
|
t.bigint :instructeur_id, null: false
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
create_join_table :bulk_messages, :groupe_instructeurs, column_options: { null: true, foreign_key: true } do |t|
|
|
|
|
t.index :bulk_message_id
|
|
|
|
t.index :groupe_instructeur_id, name: :index_bulk_messages_groupe_instructeurs_on_gi_id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|