Project

General

Profile

Actions

Defect #2966

closed

rake db:migrate fails with MySQL 6

Added by Fernando Silva over 15 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
-
Start date:
2009-03-13
Due date:
% Done:

100%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

Hi all,

I'm a new redmine user and I followed the steps from Redmine Installation guide, everything went well until the command rake db:migrate RAILS_ENV="production" , after it the migratation starts but stop on the 91 step, see the error below:

-----
90 ChangeVersionsNameLimit: migrated (0.0470s) ===========================

91 ChangeChangesetsRevisionToString: migrating ===========================
-- change_column(:changesets, :revision, :string, {:null=>false})
rake aborted!
Mysql::Error: #42000Specified key was too long; max key length is 767 bytes: ALT
ER TABLE `changesets` CHANGE `revision` `revision` varchar(255) NOT NULL

(See full trace by running task with --trace)

C:\redmine-0.8.2>

I using a windows XP Pro, MySQL Server 6.0, rubygems-update (1.3.1),rake (0.8.4, 0.7.3),rails (2.2.2) with all dependecies installed correctly.

Is there any way to execute the other steps manually? because it still has until 101 right?

Please, could anyone help me?

Best regards,
Fernando

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

This problem is related to Mysql 6, which was not tested with Redmine.
Can you change line 3 of db/migrate/091_change_changesets_revision_to_string.rb to:

change_column :changesets, :revision, :string, :limit => 150, :null => false

and rerun rake db:migrate RAILS_ENV="production"?

Actions #2

Updated by Fernando Silva over 15 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Hi Jean,

Before read your answers I found in a blog the same issue and it is really related to MySQL version 6, so I downloaded MySQL 5 and now worked!

Thanks for your support, I will try in a another machine with MySQL 6.

Best regards,
Fernando

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

  • Subject changed from Error during rake db:migrate RAILS_ENV="production" command to rake db:migrate fails with MySQL 6
Actions #4

Updated by Jean-Philippe Lang over 15 years ago

  • Status changed from Resolved to 7
  • Assignee set to Jean-Philippe Lang
Actions #5

Updated by Toshi MARUYAMA over 13 years ago

  • Category set to Database
Actions #6

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from 7 to New
Actions #7

Updated by Jean-Baptiste Barth over 11 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

Weird reason, but Oracle has abandonned the development of Mysql 6 and it never reached an official "stable" status. So I close this issue, "thanks Oracle".

Actions

Also available in: Atom PDF