creddit/db/migrate/20150714200610_create_posts.rb

14 lines
323 B
Ruby
Raw Permalink Normal View History

2015-07-14 16:29:22 -04:00
class CreatePosts < ActiveRecord::Migration
def change
create_table :posts do |t|
t.references :user, index: true, foreign_key: true
t.references :subcreddit, index: true, foreign_key: true
t.string :title
t.string :link
t.text :content
t.timestamps null: false
end
end
end