Defect #8

Schema Creation fails with Redmine 0.4.2 & MySQL 5

Added by Vijay Ram 548 days ago. Updated 207 days ago.

Status:Closed Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-

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

History

2007-02-27 13:58 - Jean-Philippe Lang

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

2008-02-03 11:23 - Jean-Philippe Lang

  • Subject changed from Schema Creation fails with Redmine 0.4.2 & MySQL 5 to Schema Creation fails with Redmine 0.4.2 & MySQL 5

Also available in: Atom PDF