cancan-attr-test/db/migrate/20130628012010_create_posts.rb
2013-06-28 01:22:16 -04:00

13 lines
223 B
Ruby

class CreatePosts < ActiveRecord::Migration
def change
create_table :posts do |t|
t.references :user
t.string :title
t.text :body
t.timestamps
end
add_index :posts, :user_id
end
end