Add puzzles to contests
This commit is contained in:
5
db/migrate/20250315124339_add_contest_ref_to_puzzle.rb
Normal file
5
db/migrate/20250315124339_add_contest_ref_to_puzzle.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddContestRefToPuzzle < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :puzzles, :contest, null: false, foreign_key: true
|
||||
end
|
||||
end
|
5
db/schema.rb
generated
5
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_03_15_114657) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_03_15_124339) do
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
@@ -53,6 +53,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_03_15_114657) do
|
||||
t.string "name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "contest_id", null: false
|
||||
t.index ["contest_id"], name: "index_puzzles_on_contest_id"
|
||||
end
|
||||
|
||||
create_table "sessions", force: :cascade do |t|
|
||||
@@ -76,5 +78,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_03_15_114657) do
|
||||
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "contests", "users"
|
||||
add_foreign_key "puzzles", "contests"
|
||||
add_foreign_key "sessions", "users"
|
||||
end
|
||||
|
Reference in New Issue
Block a user