]> git.openstreetmap.org Git - rails.git/blob - db/migrate/048_add_diary_creation_indexes.rb
Use new design on terms page
[rails.git] / db / migrate / 048_add_diary_creation_indexes.rb
1 class AddDiaryCreationIndexes < ActiveRecord::Migration
2   def self.up
3     add_index :diary_entries, [:created_at], :name => "diary_entry_created_at_index"
4     add_index :diary_entries, [:user_id, :created_at], :name => "diary_entry_user_id_created_at_index"
5     add_index :diary_entries, [:language_code, :created_at], :name => "diary_entry_language_code_created_at_index"
6   end
7
8   def self.down
9     remove_index :diary_entries, :name => "diary_entry_language_code_created_at_index"
10     remove_index :diary_entries, :name => "diary_entry_user_id_created_at_index"
11     remove_index :diary_entries, :name => "diary_entry_created_at_index"
12   end
13 end