diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-28 17:32:45 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-28 17:32:45 -0400 |
commit | 141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe (patch) | |
tree | 234bc2a3ccd234b576330061db8a17ad785135ed /db/migrate | |
parent | cfc41eb3ccc99b92220115b0710fb821525e1075 (diff) | |
download | wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.gz wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.tar.bz2 wittle-141f8b1a7e42928e94cccd0c8f89fdd56f8e2efe.zip |
created puzzle and score tables
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20231028205751_create_wittle_puzzles.rb | 11 | ||||
-rw-r--r-- | db/migrate/20231028210722_create_wittle_scores.rb | 12 |
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 @@ | |||
1 | class 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 | ||
11 | 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 @@ | |||
1 | class 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 | ||
12 | end | ||