about summary refs log tree commit diff stats
path: root/db
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-28 17:32:45 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-28 17:32:45 -0400
commit141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe (patch)
tree234bc2a3ccd234b576330061db8a17ad785135ed /db
parentcfc41eb3ccc99b92220115b0710fb821525e1075 (diff)
downloadwittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.gz
wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.bz2
wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.zip
created puzzle and score tables
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20231028205751_create_wittle_puzzles.rb11
-rw-r--r--db/migrate/20231028210722_create_wittle_scores.rb12
2 files changed, 23 insertions, 0 deletions
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 @@
1class CreateWittlePuzzles < ActiveRecord::Migration[7.1]
2 def change
3 create_table :wittle_puzzles do |t|
4 t.text :data
5 t.text :solved_data
6 t.string :category
7
8 t.timestamps
9 end
10 end
11end
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 @@
1class CreateWittleScores < ActiveRecord::Migration[7.1]
2 def change
3 create_table :wittle_scores do |t|
4 t.references :puzzle, null: false, foreign_key: true
5 t.string :name
6 t.string :ip
7 t.integer :seconds_taken
8
9 t.timestamps
10 end
11 end
12end