From 141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 28 Oct 2023 17:32:45 -0400 Subject: created puzzle and score tables --- db/migrate/20231028205751_create_wittle_puzzles.rb | 11 +++++++++++ db/migrate/20231028210722_create_wittle_scores.rb | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 db/migrate/20231028205751_create_wittle_puzzles.rb create mode 100644 db/migrate/20231028210722_create_wittle_scores.rb (limited to 'db') diff --git a/db/migrate/20231028205751_create_wittle_puzzles.rb b/db/migrate/20231028205751_create_wittle_puzzles.rb new file mode 100644 index 0000000..ebe0bf7 --- /dev/null +++ b/db/migrate/20231028205751_create_wittle_puzzles.rb @@ -0,0 +1,11 @@ +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/20231028210722_create_wittle_scores.rb b/db/migrate/20231028210722_create_wittle_scores.rb new file mode 100644 index 0000000..9ae6413 --- /dev/null +++ b/db/migrate/20231028210722_create_wittle_scores.rb @@ -0,0 +1,12 @@ +class CreateWittleScores < ActiveRecord::Migration[7.1] + def change + create_table :wittle_scores do |t| + t.references :puzzle, null: false, foreign_key: true + t.string :name + t.string :ip + t.integer :seconds_taken + + t.timestamps + end + end +end -- cgit 1.4.1