chien_app/db/migrate/1050_create_comments.rb
Nicolas Bally a1bba5a836 initial
2015-04-16 23:54:52 +02:00

22 lines
424 B
Ruby

class CreateComments < ActiveRecord::Migration
def self.up
create_table :comments do |t|
t.string :pseudo, :default => ""
t.string :email, :default => ""
t.string :website, :default => ""
t.boolean :enabled
t.text :comment
t.references :commentable, :polymorphic => true
t.references :user
t.timestamps
end
end
def self.down
drop_table :comments
end
end