From: Tom Hughes Date: Thu, 14 Jan 2010 18:37:52 +0000 (+0000) Subject: Add the changeset id to the user index so the next/previous user links X-Git-Tag: live~6343^2~15 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8de014935a2946fb36a8dcde0cd5ee409c54e793 Add the changeset id to the user index so the next/previous user links can be resolved quickly. --- diff --git a/db/migrate/049_improve_changeset_user_index.rb b/db/migrate/049_improve_changeset_user_index.rb new file mode 100644 index 000000000..af5d1a2ac --- /dev/null +++ b/db/migrate/049_improve_changeset_user_index.rb @@ -0,0 +1,11 @@ +class ImproveChangesetUserIndex < ActiveRecord::Migration + def self.up + add_index :changesets, [:user_id, :id], :name => "changesets_user_id_id_idx" + remove_index :changesets, :name => "changesets_user_id_idx" + end + + def self.down + add_index :changesets, [:user_id], :name => "changesets_user_id_idx" + remove_index :changesets, [:user_id, :id], :name => "changesets_user_id_id_idx" + end +end