blog_perso_app/db/migrate/20111209094403_create_event_contents.rb
Nicolas Bally 56a0aa9848 initial
2012-06-17 21:11:12 +02:00

28 lines
687 B
Ruby

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