add Axis, Category and Subject

This commit is contained in:
João Geonizeli
2022-07-21 09:43:08 -03:00
parent 284c17c84d
commit e191afa904
16 changed files with 302 additions and 22 deletions

View File

@@ -0,0 +1,13 @@
class CreateSubjects < ActiveRecord::Migration[7.0]
def change
create_table :subjects do |t|
t.string :name
t.references :category, null: false, foreign_key: true
t.references :axis, null: false, foreign_key: true
t.timestamps
end
add_index(:subjects, :name, unique: true)
end
end