sideplace_app/db/migrate/1050_create_comments.rb

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