|
|
class CreateProperties < ActiveRecord::Migration
def self.up
create_table :properties do |t|
t.column "active", :boolean, :default => false, :null => false
t.column "created_at", :datetime
t.column "updated_at", :datetime
t.column "name", :string, :limit => 50
t.column "location", :string, :limit => 50
t.column "sleeps", :integer, :limit => 2
t.column "description", :text
t.column "image_url1", :string, :limit => 200
t.column "image_url2", :string, :limit => 200
t.column "image_url3", :string, :limit => 200
t.column "image_url4", :string, :limit => 200
t.column "price_per_week_peak", :decimal, :precision => 10, :scale => 2
t.column "price_per_week_off_peak", :decimal, :precision => 10, :scale => 2
t.column "shower", :boolean
t.column "internet", :boolean
t.column "open_fire", :boolean
t.column "cats", :boolean
t.column "dogs", :boolean
t.column "ferrets", :boolean
t.column "owner_id", :integer
end
end
def self.down
drop_table :properties
end
end
|