react-code-dataset / airbnb_clone /db /migrate /20190710221713_create_bookings.rb
Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
395 Bytes
class CreateBookings < ActiveRecord::Migration[5.2]
def change
create_table :bookings do |t|
t.integer :guest_id, null: false
t.integer :spot_id, null: false
t.date :check_in, null: false
t.date :check_out, null: false
t.integer :num_guest, null: false
t.timestamps
end
add_index :bookings, :guest_id
add_index :bookings, :spot_id
end
end