安装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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值