Skip to content

Commit

Permalink
Reduced text columns in taggings from 255 characters to 50 characters…
Browse files Browse the repository at this point in the history
… to facilitate index creation on MySQL databases with a default storage engine of MyISAM.
  • Loading branch information
HuckyDucky authored and steveyken committed Dec 27, 2012
1 parent 70ed8b5 commit 6bdf112
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions db/migrate/20100928030627_acts_as_taggable_on_migration.rb
Expand Up @@ -5,15 +5,15 @@ def self.up
end

create_table :taggings do |t|
t.column :tag_id, :integer
t.column :taggable_id, :integer
t.column :tagger_id, :integer
t.column :tagger_type, :string
t.integer :tag_id
t.integer :taggable_id
t.integer :tagger_id
t.string :tagger_type

# You should make sure that the column created is
# long enough to store the required class names.
t.column :taggable_type, :string
t.column :context, :string
t.string :taggable_type, :limit => 50
t.string :context, :limit => 50

t.column :created_at, :datetime
end
Expand Down

0 comments on commit 6bdf112

Please sign in to comment.