From e9f3ed0795b1827472337e9bd0b108dec8d7cdea Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 30 Oct 2023 14:34:22 -0400 Subject: Installed Wittle --- .../20231030181439_create_wittle_puzzles.wittle.rb | 12 ++++++++++++ .../20231030181440_create_wittle_scores.wittle.rb | 13 +++++++++++++ db/schema.rb | 20 +++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20231030181439_create_wittle_puzzles.wittle.rb create mode 100644 db/migrate/20231030181440_create_wittle_scores.wittle.rb (limited to 'db') 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 @@ +# This migration comes from wittle (originally 20231028205751) +class CreateWittlePuzzles < ActiveRecord::Migration[7.1] + def change + create_table :wittle_puzzles do |t| + t.text :data + t.text :solved_data + t.string :category + + t.timestamps + end + end +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 @@ +# This migration comes from wittle (originally 20231028210722) +class CreateWittleScores < ActiveRecord::Migration[7.1] + def change + create_table :wittle_scores do |t| + t.references :puzzle, null: false + t.string :name + t.string :ip + t.integer :seconds_taken + + t.timestamps + end + end +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 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_10_21_020306) do +ActiveRecord::Schema[7.1].define(version: 2023_10_30_181440) do create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false @@ -416,6 +416,24 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_21_020306) do t.index ["votable_type", "votable_id"], name: "index_votes_on_votable" end + create_table "wittle_puzzles", force: :cascade do |t| + t.text "data" + t.text "solved_data" + t.string "category" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "wittle_scores", force: :cascade do |t| + t.integer "puzzle_id", null: false + t.string "name" + t.string "ip" + t.integer "seconds_taken" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["puzzle_id"], name: "index_wittle_scores_on_puzzle_id" + end + 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 "blogs", "users" -- cgit 1.4.1