Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Fix taggings_idx
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Sep 21, 2015
1 parent 8150cf2 commit 3c4eff8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions db/migrate/20150921081619_rename_taggings_idx.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class RenameTaggingsIdx < ActiveRecord::Migration
def up
remove_index :ci_taggings, name: 'taggings_idx'
add_index :ci_taggings,
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'ci_taggings_idx'
end
end
8 changes: 4 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150914102123) do
ActiveRecord::Schema.define(version: 20150921081619) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -168,7 +168,7 @@
t.datetime "created_at"
end

add_index "ci_taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
add_index "ci_taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "ci_taggings_idx", unique: true, using: :btree
add_index "ci_taggings", ["taggable_id", "taggable_type", "context"], name: "index_ci_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree

create_table "ci_tags", force: true do |t|
Expand Down Expand Up @@ -221,7 +221,7 @@
t.datetime "updated_at"
end

add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree
add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
add_index "sessions", ["session_id"], name: "index_ci_sessions_on_session_id", using: :btree
add_index "sessions", ["updated_at"], name: "index_ci_sessions_on_updated_at", using: :btree

end

0 comments on commit 3c4eff8

Please sign in to comment.