diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20231030181439_create_wittle_puzzles.wittle.rb | 12 | ||||
| -rw-r--r-- | db/migrate/20231030181440_create_wittle_scores.wittle.rb | 13 | ||||
| -rw-r--r-- | db/schema.rb | 20 |
3 files changed, 44 insertions, 1 deletions
| diff --git a/db/migrate/20231030181439_create_wittle_puzzles.wittle.rb b/db/migrate/20231030181439_create_wittle_puzzles.wittle.rb new file mode 100644 index 0000000..9accf92 --- /dev/null +++ b/db/migrate/20231030181439_create_wittle_puzzles.wittle.rb | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # This migration comes from wittle (originally 20231028205751) | ||
| 2 | class CreateWittlePuzzles < ActiveRecord::Migration[7.1] | ||
| 3 | def change | ||
| 4 | create_table :wittle_puzzles do |t| | ||
| 5 | t.text :data | ||
| 6 | t.text :solved_data | ||
| 7 | t.string :category | ||
| 8 | |||
| 9 | t.timestamps | ||
| 10 | end | ||
| 11 | end | ||
| 12 | end | ||
| diff --git a/db/migrate/20231030181440_create_wittle_scores.wittle.rb b/db/migrate/20231030181440_create_wittle_scores.wittle.rb new file mode 100644 index 0000000..5110221 --- /dev/null +++ b/db/migrate/20231030181440_create_wittle_scores.wittle.rb | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # This migration comes from wittle (originally 20231028210722) | ||
| 2 | class CreateWittleScores < ActiveRecord::Migration[7.1] | ||
| 3 | def change | ||
| 4 | create_table :wittle_scores do |t| | ||
| 5 | t.references :puzzle, null: false | ||
| 6 | t.string :name | ||
| 7 | t.string :ip | ||
| 8 | t.integer :seconds_taken | ||
| 9 | |||
| 10 | t.timestamps | ||
| 11 | end | ||
| 12 | end | ||
| 13 | end | ||
| diff --git a/db/schema.rb b/db/schema.rb index 541f1c1..b036d7f 100644 --- a/db/schema.rb +++ b/db/schema.rb | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | # | 10 | # |
| 11 | # It's strongly recommended that you check this file into your version control system. | 11 | # It's strongly recommended that you check this file into your version control system. |
| 12 | 12 | ||
| 13 | ActiveRecord::Schema[7.0].define(version: 2023_10_21_020306) do | 13 | ActiveRecord::Schema[7.1].define(version: 2023_10_30_181440) do |
| 14 | create_table "active_storage_attachments", force: :cascade do |t| | 14 | create_table "active_storage_attachments", force: :cascade do |t| |
| 15 | t.string "name", null: false | 15 | t.string "name", null: false |
| 16 | t.string "record_type", null: false | 16 | t.string "record_type", null: false |
| @@ -416,6 +416,24 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_21_020306) do | |||
| 416 | t.index ["votable_type", "votable_id"], name: "index_votes_on_votable" | 416 | t.index ["votable_type", "votable_id"], name: "index_votes_on_votable" |
| 417 | end | 417 | end |
| 418 | 418 | ||
| 419 | create_table "wittle_puzzles", force: :cascade do |t| | ||
| 420 | t.text "data" | ||
| 421 | t.text "solved_data" | ||
| 422 | t.string "category" | ||
| 423 | t.datetime "created_at", null: false | ||
| 424 | t.datetime "updated_at", null: false | ||
| 425 | end | ||
| 426 | |||
| 427 | create_table "wittle_scores", force: :cascade do |t| | ||
| 428 | t.integer "puzzle_id", null: false | ||
| 429 | t.string "name" | ||
| 430 | t.string "ip" | ||
| 431 | t.integer "seconds_taken" | ||
| 432 | t.datetime "created_at", null: false | ||
| 433 | t.datetime "updated_at", null: false | ||
| 434 | t.index ["puzzle_id"], name: "index_wittle_scores_on_puzzle_id" | ||
| 435 | end | ||
| 436 | |||
| 419 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" | 437 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
| 420 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" | 438 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" |
| 421 | add_foreign_key "blogs", "users" | 439 | add_foreign_key "blogs", "users" |
