foodsoft/db/migrate/20211208142719_create_group_order_invoices.rb
2023-07-24 10:50:35 +02:00

13 lines
371 B
Ruby

class CreateGroupOrderInvoices < ActiveRecord::Migration[5.2]
def change
create_table :group_order_invoices do |t|
t.integer :group_order_id
t.bigint :invoice_number, unique: true, limit: 8
t.date :invoice_date
t.string :payment_method
t.timestamps
end
add_index :group_order_invoices, :group_order_id, unique: true
end
end