16 lines
479 B
Ruby
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
|