Project

General

Profile

Actions

Defect #5229

closed

db:migrate fails from older redmine

Added by Marc Tooley about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2010-04-01
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

After running the upgrade procedure in the docs/UPGRADING instruction set, when running:

bash-3.1$ rake db:migrate RAILS_ENV="production"

... I get a few successful notes of upgrade and then:

CreateGroupsUsers: migrating ============================================
-- create_table(:groups_users, {:id=>false})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: Table 'groups_users' already exists: CREATE TABLE `groups_users` (`group_id` int(11) NOT NULL, `user_id` int(11) NOT NULL) ENGINE=InnoDB

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

I didn't grab the --trace because I was just interested in fixing it. Deleting that table (which was empty at the time) allowed me to successfully from the db:migrate once more and it just worked after that.

Since the fix seems simple enough, I didn't think it warranted a whole new re-import of the old data. But, if you really insist, I will.

It's from the Bitnami stack for 0.9.3-stable.

Actions #1

Updated by Jean-Philippe Lang about 15 years ago

  • Status changed from New to Closed
  • Resolution set to Cant reproduce

This table is only created once (in CreateGroupsUsers migration).
I don't know from which version you were upgrading and there's nothing I can fix.

Actions #2

Updated by Marc Tooley about 15 years ago

  • Status changed from Closed to Reopened

Could I request that you make sure it doesn't error out, but instead just deletes the table?

I was upgrading from a relatively old version. But since that machine crashed, I no long have access to which one.

Actions #3

Updated by Marc Tooley about 15 years ago

Further: in examining my old from-the-old-machine MySQL dump, I see no such table there. Somewhere along the line, then, I must've either run the upgrade procedure twice, or it was run for me. I guess if I want to know more I'll have to run through the upgrade procedure again..

Actions #4

Updated by minkbear minkbear about 15 years ago

It might be problem from your installed plugin.
Because I have found the problem like this then take a look on my installed plugin.
So I met my installed plugin create table which name is the same.

Actions #5

Updated by Felix Schäfer almost 15 years ago

  • Status changed from Reopened to Closed

Closing this as it seems outdated.

Actions

Also available in: Atom PDF