rosa-build/db/migrate/20111216140849_create_comme...

17 lines
307 B
Ruby
Raw Permalink Normal View History

class CreateComments < ActiveRecord::Migration
def self.up
create_table :comments do |t|
2014-03-14 17:41:49 +00:00
t.integer :commentable_id, references: nil
t.string :commentable_type
t.integer :user_id
t.text :body
t.timestamps
end
end
def self.down
drop_table :comments
end
end