Defect #8
closedSchema Creation fails with Redmine 0.4.2 & MySQL 5
0%
Description
Hi
I am using MySQL 5 and I am getting some errors when I run the
rake migrate RAILS_ENV="production"
I have attached the errors here:
In 001_setup.rb
Mysql::Error: #42000BLOB/TEXT column 'possible_values' can't have a default value:
CREATE TABLE custom_fields (`id` int(11) DEFAULT NULL auto_increment PRIMARYKEY,
`type` varchar(30) DEFAULT '' NOT NULL,
`name` varchar(30) DEFAULT '' NOT NULL,
`field_format` varchar(30) DEFAULT '' NOT NULL,
`possible_values` text DEFAULT '',
`regexp` varchar(255) DEFAULT '',
`min_length` int(11) DEFAULT 0 NOT NULL,
`max_length` int(11) DEFAULT 0 NOT NULL,
`is_required` tinyint(1) DEFAULT 0 NOT NULL,
`is_for_all` tinyint(1) DEFAULT 0 NOT NULL) ENGINE=InnoDB
The following tables have the similar error:
TABLE NAME COLUMN NAME
custom_values value
documents description
issue_histories notes
issues description
news description
In 010_create_comments.rb:
TABLE NAME COLUMN NAME
comments comment
I just removed the DEFAULT' ' next to the text fields and the schema got created.
I have the 0.4.2 version of Redmine.
-Vijay
Updated by Jean-Philippe Lang over 17 years ago
After researches, this problem occurs when mysql is running in
strict mode, which seems to be the default mode set by the mysql
windows installer.
There's no problem when strict mode is disabled.
I'll try to look at it more in depth and fix the migration
scripts.
Thanks for your submission.
Regards,
Jean-Philippe
Updated by Jean-Philippe Lang almost 17 years ago
- Subject changed from Schema Creation fails with Redmine 0.4.2 & MySQL 5 to Schema Creation fails with Redmine 0.4.2 & MySQL 5