final/db/migrate/20151204094413_create_artic...

13 lines
308 B
Ruby

class CreateArticleComments < ActiveRecord::Migration
def change
create_table :article_comments do |t|
t.integer :article_id
t.integer :user_id
t.text :content
t.timestamps
end
add_index :article_comments, :article_id
add_index :article_comments, :user_id
end
end