demarches-normaliennes/db/migrate/20240729160650_create_contact_forms.rb

18 lines
530 B
Ruby
Raw Normal View History

2024-07-30 18:26:53 +02:00
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