react-code-dataset / facenovel /db /migrate /20181015022837_create_comments.rb
Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
360 Bytes
class CreateComments < ActiveRecord::Migration[5.2]
def change
create_table :comments do |t|
t.integer :author_id, null: false
t.integer :post_id, null: false
t.integer :parent_id, default: nil
t.string :body, null: false
t.timestamps
end
add_index :comments, :post_id
add_index :comments, :parent_id
end
end