add archive model

This commit is contained in:
Christophe Robillard 2021-03-29 17:07:46 +02:00
parent 959026ca4f
commit c25f3c79d9
6 changed files with 153 additions and 0 deletions

View file

@ -0,0 +1,17 @@
class CreateArchiveForGroupeInstructeur < ActiveRecord::Migration[6.0]
def change
create_table :archives do |t|
t.string :status, null: false
t.date :month
t.string :content_type, null: false
t.timestamps
end
create_table "archives_groupe_instructeurs", force: :cascade do |t|
t.belongs_to :archive, foreign_key: true, null: false
t.belongs_to :groupe_instructeur, foreign_key: true, null: false
t.timestamps
end
end
end