summaryrefslogtreecommitdiff
path: root/db/migrate/20230405013826_create_carts.rb
blob: f66e030d55a5c095661d087bdb2bdb79da08fa4c (plain)
1
2
3
4
5
6
7
8
9
10
class CreateCarts < ActiveRecord::Migration[7.0]
  def change
    create_table :carts do |t|
      t.timestamps
    end

    add_reference :user_accounts, :cart, foreign_key: true
    add_reference :carts, :user_account, foreign_key: true
  end
end