cancan-attr-test/db/migrate/20130628012010_create_posts.rb

13 lines
223 B
Ruby
Raw Normal View History

2013-06-28 05:22:16 +00:00
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