Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bborn committed Feb 20, 2012
1 parent d717b2d commit c78f200
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions db/migrate/080_migrate_to_acts_as_taggable_on.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
class MigrateToActsAsTaggableOn < ActiveRecord::Migration

def self.change
def self.up

change_table :taggings do |t|
t.references :tagger, :polymorphic => true
t.string :context, :limit => 128
t.datetime :created_at
end

add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings, [:taggable_id, :taggable_type, :context]
end

def self.down

end

end

0 comments on commit c78f200

Please sign in to comment.