class CreateEventContents < ActiveRecord::Migration
  def change
    create_table :event_contents do |t|
      t.string :title
      t.text :description
      t.datetime :start_at
      t.boolean :tremplin
      t.string :artist
      t.integer :event_type 
      t.string :place
      t.text :address
      t.decimal :latitude, :precision => 15, :scale => 10
      t.decimal :longitude, :precision => 15, :scale => 10
      t.references :image_file
    	t.integer :cible_id
    	t.string :cible_type
       t.boolean :with_cible
       t.boolean :popup
      t.timestamps
    end
  end
  
  def self.up
    ContentType.create(:slug => "EventContent", :name => "Evenement")
  end
  
end
