]> git.openstreetmap.org Git - rails.git/blob - db/migrate/049_improve_changeset_user_index.rb
Ah, that doesn't work due to 'bugs' in the way layouts work - only the last command...
[rails.git] / db / migrate / 049_improve_changeset_user_index.rb
1 class ImproveChangesetUserIndex < ActiveRecord::Migration
2   def self.up
3     add_index :changesets, [:user_id, :id], :name => "changesets_user_id_id_idx"
4     remove_index :changesets, :name => "changesets_user_id_idx"
5   end
6
7   def self.down
8     add_index :changesets, [:user_id], :name => "changesets_user_id_idx"
9     remove_index :changesets, :name => "changesets_user_id_id_idx"
10   end
11 end