Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated Changelog

  • Loading branch information...
commit 5e44184a4e2253e48bda1434547b85cb743afc29 1 parent f7ac354
ganesh authored fxn committed
Showing with 6 additions and 12 deletions.
  1. +6 −12 activerecord/CHANGELOG
View
18 activerecord/CHANGELOG
@@ -237,19 +237,13 @@
rails g model post user:belongs_to will generate the following:
class CreatePosts < ActiveRecord::Migration
- def up
- create_table :posts do |t|
- t.belongs_to :user
-
- t.timestamps
+ def change
+ create_table :posts do |t|
+ t.belongs_to :user
+ t.timestamps
+ end
+ add_index :posts, :user_id
end
-
- add_index :posts, :user_id
- end
-
- def down
- drop_table :posts
- end
end
[Santiago Pastorino]
Please sign in to comment.
Something went wrong with that request. Please try again.