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

27 lines
523 B
Ruby

# -*- encoding : utf-8 -*-
class CreateImageContents < ActiveRecord::Migration
def self.up
create_table :image_contents do |t|
t.references :image_file
t.integer :width
t.integer :height
t.string :alignement
t.boolean :expandable
t.string :style
t.string :alt
t.integer :cible_id
t.string :cible_type
t.boolean :with_cible
t.boolean :popup
t.timestamps
end
ContentType.create(:slug => "ImageContent", :name => "Image")
end
def self.down
drop_table :image_contents
end
end