19 lines
548 B
Ruby
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
|