安装REDMINE,出现Mysql::Error: BLOB/TEXT column 'description'
安装时候,会出现Mysql::Error: BLOB/TEXT column 'description' can't have a default value: ALTER TABLE `projects` CHANGE `description` `description` text DEFAULT ''
这个问题可以如下解决:
I think your problem in issues controller is not the same question with my migration error.
to JP Lang:
I have resolved my migration error by some irregular method. Please note:
1. MySQL 5.0 and 5.1 will not allow default value for BLOB/TEXT column.
2. If MySQL is working in strict mode, it will report an error on a TEXT column's default value and stop. While if its work mode is not strict mode(maybe sql_mode=""), it will just give out a warning instead of an error and the sql command will be executed successfully.
3. MySQL 5.0 binary installed on windows will work in strict mode in default. While it will not work in strict mode on linux compiled from source.(I'm not sure with linux because I use windows xp)
4. So maybe most of the redmine's users wouldn't encounter this problem...
So, to windows users of redmine, if you have encountered my problem, there is a solution:
1. find your mysql server's ini file, will be "MySQL\MySQL Server 5.0\my.ini" in default.,找到my.ini文件
2. locate this line: sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
3. add a "#" to the head: #sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
4. restart mysql server
5. run rake db:migrate, it should succeed this time
6. change the my.ini file back and restart mysql server
--转自