Add completions
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2025-03-20 11:12:55 +01:00
parent 44507bb85c
commit a03907f756
20 changed files with 213 additions and 14 deletions

View 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

View File

@@ -0,0 +1,5 @@
class AddContestRefToCompletion < ActiveRecord::Migration[8.0]
def change
add_reference :completions, :contest, null: false, foreign_key: true
end
end