Add completions
This commit is contained in:
11
db/migrate/20250320082658_create_completions.rb
Normal file
11
db/migrate/20250320082658_create_completions.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateCompletions < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :completions do |t|
|
||||
t.integer :time_seconds
|
||||
t.belongs_to :contestant, null: false, foreign_key: true
|
||||
t.belongs_to :puzzle, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@@ -0,0 +1,5 @@
|
||||
class AddContestRefToCompletion < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :completions, :contest, null: false, foreign_key: true
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user