Files
sx-fc/db/migrate/20170404034234_create_bookings.rb
2017-04-05 08:24:21 +06:30

19 lines
548 B
Ruby

class CreateBookings < ActiveRecord::Migration[5.0]
def change
create_table :bookings do |t|
t.references :dining_facility, foreign_key: true
t.string :type, :null => false, :default => "Table"
t.datetime :checkin_at, :null => false
t.string :checkin_by
t.datetime :checkout_at
t.string :checkout_by
t.datetime :reserved_at
t.string :reserved_by
t.string :booking_status, :null => false, :default => "new"
t.references :sale, foreign_key: true
t.timestamps
end
end
end