summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20230405013826_create_carts.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20230405013826_create_carts.rb b/db/migrate/20230405013826_create_carts.rb
new file mode 100644
index 0000000..8975e61
--- /dev/null
+++ b/db/migrate/20230405013826_create_carts.rb
@@ -0,0 +1,9 @@
+class CreateCarts < ActiveRecord::Migration[7.0]
+ def change
+ create_table :carts do |t|
+ t.belongs_to :user_account, null: false, index: { unique: true }, foreign_key: true
+
+ t.timestamps
+ end
+ end
+end