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

19 lines
561 B
Ruby

# frozen_string_literal: true
class CreateContactForms < ActiveRecord::Migration[7.0]
def change
create_table :contact_forms do |t|
t.string :email
t.string :subject, null: false
t.text :text, null: false
t.string :question_type, null: false
t.references :user, null: true, foreign_key: true
t.bigint :dossier_id # not a reference (dossier may not exist)
t.string :phone
t.string :tags, array: true, default: []
t.boolean :for_admin, default: false, null: false
t.timestamps
end
end
end