Sha256: 11add17e9fe0691542ee88d2d9c235b7f9daf983a71fd88226419f8f6fc95b9e

Contents?: true

Size: 391 Bytes

Versions: 7

Compression:

Stored size: 391 Bytes

Contents

class ActsAsTaggableOnMigration < ActiveRecord::Migration
  def self.up
    change_table :taggings do |t|
      t.references :tagger, :polymorphic => true
      t.string :context
    end
    remove_index :taggings, [:taggable_id, :taggable_type]
    add_index :taggings, [:taggable_id, :taggable_type, :context]
  end

  def self.down
    drop_table :taggings
    drop_table :tags
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alchemy_crm-2.0.5 db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.0.4.1 db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.1.0a db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.0.3 db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.0.2 db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.0.1 db/migrate/20111028091722_acts_as_taggable_on_migration.rb
alchemy_crm-2.0.0 db/migrate/20111028091722_acts_as_taggable_on_migration.rb