react-code-dataset / Facebook-Clone /db /migrate /20180613071433_create_table_posts.rb
Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
235 Bytes
class CreateTablePosts < ActiveRecord::Migration[5.2]
def change
create_table :posts do |t|
t.integer :author_id,null:false
t.text :body,null:false
t.timestamps
end
add_index :posts,:author_id
end
end