summaryrefslogtreecommitdiff
path: root/db/migrate/20231030045347_create_runs.rb
diff options
context:
space:
mode:
authorDavid Gay <eapoems@riseup.net>2023-10-30 01:06:05 -0400
committerDavid Gay <eapoems@riseup.net>2023-10-30 01:06:05 -0400
commit5e7909e61695d002d45ce58fa010502c5eb8da51 (patch)
tree4196596af1edc31a6ba073a09e53a0ac32d02807 /db/migrate/20231030045347_create_runs.rb
parentf47ca741d81a8de56fdd1cee1114b9c676d8b245 (diff)
Game, Run, Checkpoint models
Diffstat (limited to 'db/migrate/20231030045347_create_runs.rb')
-rw-r--r--db/migrate/20231030045347_create_runs.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20231030045347_create_runs.rb b/db/migrate/20231030045347_create_runs.rb
new file mode 100644
index 0000000..a0aaba1
--- /dev/null
+++ b/db/migrate/20231030045347_create_runs.rb
@@ -0,0 +1,12 @@
+class CreateRuns < ActiveRecord::Migration[7.1]
+ def change
+ create_table :runs do |t|
+ t.string :title, null: false
+ t.text :description
+ t.references :game, null: false, foreign_key: true
+ t.references :user, null: false, foreign_key: true
+
+ t.timestamps
+ end
+ end
+end