added the missing tag followings indecies
This commit is contained in:
parent
db3e411978
commit
162d3ccd10
2 changed files with 18 additions and 1 deletions
|
|
@ -0,0 +1,13 @@
|
|||
class AddMissingTagFollowingsIndices < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :tag_followings, :tag_id
|
||||
add_index :tag_followings, :user_id
|
||||
add_index :tag_followings, [:tag_id, :user_id], :unique => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :tag_followings, :column => [:tag_id, :user_id]
|
||||
remove_index :tag_followings, :column => :user_id
|
||||
remove_index :tag_followings, :column => :tag_id
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20111023230730) do
|
||||
ActiveRecord::Schema.define(:version => 20111026173547) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id", :null => false
|
||||
|
|
@ -385,6 +385,10 @@ ActiveRecord::Schema.define(:version => 20111023230730) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "tag_followings", ["tag_id", "user_id"], :name => "index_tag_followings_on_tag_id_and_user_id", :unique => true
|
||||
add_index "tag_followings", ["tag_id"], :name => "index_tag_followings_on_tag_id"
|
||||
add_index "tag_followings", ["user_id"], :name => "index_tag_followings_on_user_id"
|
||||
|
||||
create_table "taggings", :force => true do |t|
|
||||
t.integer "tag_id"
|
||||
t.integer "taggable_id"
|
||||
|
|
|
|||
Loading…
Reference in a new issue