Files
sx-fc/db/migrate/20170403144732_create_room_bookings.rb
2017-04-04 01:09:17 +06:30

16 lines
479 B
Ruby

class CreateRoomBookings < ActiveRecord::Migration[5.0]
def change
create_table :room_bookings do |t|
t.references :room, :null => false
t.datetime :checkin_at, :null => false
t.datetime :checkout_at
t.string :checkout_by
t.datetime :reserved_at
t.string :reserved_by
t.string :status, :null => false, :default => "new"
t.boolean :is_currently_checkin, :default => false, :null => true
t.timestamps
end
end
end