sideplace_app/db/migrate/20150324221808_create_annonces.rb

31 lines
788 B
Ruby

class CreateAnnonces < ActiveRecord::Migration
def change
create_table :annonces do |t|
t.string :title
t.string :slug
t.references :annonce_account, index: true
t.string :city_id
t.string :city_slug
t.string :cp
t.string :dpt
t.string :nom_departement
t.string :nom_region
t.integer :default_photo_id
t.integer :revisiontodisplay
t.text :content
t.string :refused
t.text :content_moderated
t.decimal :price, :precision => 15, :scale => 10
t.references :annonce_cat, index: true
t.datetime :expire_after
t.string :moderated
t.string :enabled
t.integer :specific_annonce_id
t.string :specific_annonce_type
t.timestamps null: false
end
end
end