17 lines
290 B
Ruby
17 lines
290 B
Ruby
|
class CreateComments < ActiveRecord::Migration
|
||
|
def self.up
|
||
|
create_table :comments do |t|
|
||
|
t.integer :commentable_id
|
||
|
t.string :commentable_type
|
||
|
t.integer :user_id
|
||
|
t.text :body
|
||
|
|
||
|
t.timestamps
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def self.down
|
||
|
drop_table :comments
|
||
|
end
|
||
|
end
|