script/generate acts_as_taggable_on_migration
rake db:migrate
導致Mysql ::錯誤:指定的鍵太長;最大密鑰長度爲1000字節
Mysql::Error: Specified key was too long; max key length is 1000 bytes: CREATE INDEX `index_taggings_on_taggable_id_and_taggable_type_and_context` ON `taggings` (`taggable_id`, `taggable_type`, `context`)
我應該怎麼辦?
這裏是我的數據庫編碼:
mysql> SHOW VARIABLES LIKE 'character\_set\_%';
+--------------------------+--------+
| Variable_name | Value |
+--------------------------+--------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
+--------------------------+--------+
7 rows in set (0.00 sec)
首先提供更多信息來解決。正在遷移什麼? – 2010-08-15 20:23:24
http://github.com/mbleigh/acts-as-taggable-on – amaseuk 2010-08-15 20:25:30
http://github.com/mbleigh/acts-as-taggable-on/blob/master/generators/acts_as_taggable_on_migration/templates/migration.rb – amaseuk 2010-08-15 20:26:29