add new tables and models for join through association

This commit is contained in:
Bilal
2020-04-29 07:22:03 +02:00
parent fe96f682db
commit e0fae50584
3 changed files with 101 additions and 6 deletions

View File

@@ -44,4 +44,19 @@ ActiveRecord::Schema.define do
t.string :name
t.timestamps null: false
end
create_table :players, force: true do |t|
t.string :name
t.string :value
t.timestamps null: false
end
create_table :ptags, force: true do |t|
t.string :value
end
create_table :taggings, force: true do |t|
t.belongs_to :player
t.belongs_to :ptag
end
end