Implement Tournament-Team relation
This commit is contained in:
parent
3043c9f0d7
commit
07eb561f77
|
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Team < ApplicationRecord
|
||||
belongs_to :tournament
|
||||
end
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ class CreateSchema < ActiveRecord::Migration[5.2]
|
|||
t.integer :group_points_scored
|
||||
t.integer :group_points_recieved
|
||||
|
||||
t.belongs_to :tournament, index: true, null: false, foreign_key: { on_delete: :cascade }
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue