final/db/migrate/20151204094413_create_artic...

13 lines
308 B
Ruby
Raw Normal View History

2015-12-07 04:43:35 +08:00
class CreateArticleComments < ActiveRecord::Migration
def change
create_table :article_comments do |t|
2015-12-09 05:05:24 +08:00
t.integer :article_id
t.integer :user_id
t.text :content
t.timestamps
2015-12-07 04:43:35 +08:00
end
2015-12-09 05:05:24 +08:00
add_index :article_comments, :article_id
add_index :article_comments, :user_id
2015-12-07 04:43:35 +08:00
end
end