Defect #20662

db:migrate fails in upgrade from 3.0.3 to 3.1.0 fails (Bitnami)

Added by Gustavo Regal over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:3.1.0


I had 3.0.3 running OK (Bitnami Windows download).
Tried to upgrade to 3.1.0.

Backed up 3.0.3 MySQL DB and restored it to 3.1.0.
Run rake db:migrate and got the following error.

F:\Bitnami\redmine-3.1.0-0\apps\redmine\htdocs>bundle exec rake db:migrate RAILS
_ENV=production --trace
DL is deprecated, please use Fiddle
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20150528092912 CreateRolesManagedRoles: migrating ==========================
-- create_table(:roles_managed_roles, {:id=>false})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Table 'roles_managed_roles' already exists: CREATE TABLE `roles_m
anaged_roles` (`role_id` int(11) NOT NULL, `managed_role_id` int(11) NOT NULL) E
_adapter.rb:305:in `query'

Is it a bug in migration script or have I done something wrong?

Thanks in advance.


#1 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from New to Closed
  • Priority changed from High to Normal

Please contact bitnami team.

#2 Updated by Gustavo Regal over 4 years ago


Issue solved.
It was actually nothing related to Bitnami specifics.

I realized I should have dropped and recreated my DB before restoring the backup.

Sorry for disturbing.

Also available in: Atom PDF