diff options
Diffstat (limited to 'db')
-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 | ||