pw_app/db/migrate/1050_create_comments.rb
Nicolas Bally 2a1d9dadc7 initial
2015-10-26 15:00:29 +01: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