Created
April 26, 2014 11:29
-
-
Save SpringMT/11317662 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/db/migrate/20140426112747_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb b/db/migrate/20140426112747_acts_as_taggable_on_migratio | |
n.acts_as_taggable_on_engine.rb | |
index 6bbd559..9d9df73 100644 | |
--- a/db/migrate/20140426112747_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb | |
+++ b/db/migrate/20140426112747_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb | |
@@ -2,7 +2,7 @@ | |
class ActsAsTaggableOnMigration < ActiveRecord::Migration | |
def self.up | |
create_table :tags do |t| | |
- t.string :name | |
+ t.string :name, limit: 191 | |
end | |
create_table :taggings do |t| | |
@@ -10,8 +10,8 @@ class ActsAsTaggableOnMigration < ActiveRecord::Migration | |
# You should make sure that the column created is | |
# long enough to store the required class names. | |
- t.references :taggable, polymorphic: true | |
- t.references :tagger, polymorphic: true | |
+ t.references :taggable, polymorphic: {limit: 191} | |
+ t.references :tagger, polymorphic: {limit: 191} | |
# Limit is created to prevent MySQL error on index | |
# length for MyISAM table type: http://bit.ly/vgW2Ql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment