Sha256: d565d21abb46ae28b1be7cf5359444744417fa07a070e6c88aca6abb67883530

Contents?: true

Size: 583 Bytes

Versions: 10

Compression:

Stored size: 583 Bytes

Contents

class StillMoreIndexes < ActiveRecord::Migration
  def self.up
    add_index :posts, :user_id
    add_index :tags, :name    
    add_index :taggings, [:taggable_id, :taggable_type]
    add_index :photos, :created_at
    add_index :users, :created_at
    add_index :clippings, :created_at
  end

  def self.down
    remove_index :posts, :user_id        
    remove_index :tags, :name
    remove_index :taggings, :column => [:taggable_id, :taggable_type]
    remove_index :photos, :created_at    
    remove_index :users, :created_at
    remove_index :clippings, :created_at
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
community_engine-3.2.0 db/migrate/060_still_more_indexes.rb
community_engine-3.0.0 db/migrate/060_still_more_indexes.rb
community_engine-2.3.2 db/migrate/060_still_more_indexes.rb
community_engine-2.3.1 db/migrate/060_still_more_indexes.rb
community_engine-2.3.0 db/migrate/060_still_more_indexes.rb
community_engine-2.1.0 db/migrate/060_still_more_indexes.rb
community_engine-2.0.0 db/migrate/060_still_more_indexes.rb
community_engine-2.0.0.beta3 db/migrate/060_still_more_indexes.rb
community_engine-2.0.0.beta2 db/migrate/060_still_more_indexes.rb
community_engine-2.0.0.beta1 db/migrate/060_still_more_indexes.rb