Skip to content

Commit d5df85d

Browse files
committed
remove index posts.user_id
1 parent cf77af6 commit d5df85d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class RemoveIndexPostsUserId < ActiveRecord::Migration
2+
def up
3+
remove_index :posts, :user_id
4+
end
5+
6+
def down
7+
add_index :posts, :user_id
8+
end
9+
end

db/schema.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20110906073224) do
14+
ActiveRecord::Schema.define(:version => 20110906073603) do
1515

1616
create_table "posts", :force => true do |t|
1717
t.string "title"
@@ -25,7 +25,6 @@
2525
add_index "posts", ["created_at"], :name => "index_posts_on_created_at"
2626
add_index "posts", ["published"], :name => "index_posts_on_published"
2727
add_index "posts", ["user_id", "published"], :name => "index_posts_on_user_id_and_published"
28-
add_index "posts", ["user_id"], :name => "index_posts_on_user_id"
2928

3029
create_table "users", :force => true do |t|
3130
t.string "name"

0 commit comments

Comments
 (0)