1 2 3 4 5 6 7 8 9 10 11
class CreatePayments < ActiveRecord::Migration[7.0] def change create_table :payments do |t| t.references :order, null: false, foreign_key: true t.references :card, null: false, foreign_key: true t.float :total t.timestamps end end end