basic layout template
This commit is contained in:
18
db/migrate/20170404034234_create_bookings.rb
Normal file
18
db/migrate/20170404034234_create_bookings.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
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
|
||||
10
db/migrate/20170404041147_create_table_booking_orders.rb
Normal file
10
db/migrate/20170404041147_create_table_booking_orders.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateTableBookingOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :table_booking_orders do |t|
|
||||
t.references :table_booking
|
||||
t.references :order, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
10
db/migrate/20170404041218_create_room_booking_orders.rb
Normal file
10
db/migrate/20170404041218_create_room_booking_orders.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateRoomBookingOrders < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :room_booking_orders do |t|
|
||||
t.references :room_booking
|
||||
t.references :order, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user