Cannot upgrade 1.4.0: create user_email_map fails

Issue #554 resolved
Ton Plomp created an issue

I tried to upgrade my 1.3.6 DB to 1.4.0

However running paster update-db production.ini is failing at CREATE TABLE user_email_map ( email_id INTEGER NOT NULL AUTO_INCREMENT, user_id INTEGER, email VARCHAR(255), PRIMARY KEY (email_id), UNIQUE (email), UNIQUE (email_id), FOREIGN KEY(user_id) REFERENCES users(user_id) )ENGINE=InnoDB CHARSET=utf8

If I try to run that sql code I get a: Can't create table 'rhodecode.user_email_map' (errno: 150)

If I run SHOW ENGINE INNODB STATUS It returns (amongst others): LATEST FOREIGN KEY ERROR ------------------------ 120905 14:22:09 Error in foreign key constraint of table rhodecode/user_email_map: FOREIGN KEY(user_id) REFERENCES users(user_id) )ENGINE=InnoDB CHARSET=utf8: Cannot resolve table name close to: (user_id) )ENGINE=InnoDB CHARSET=utf8

However I have a column user_id in users.

I checked my users table, but nothing seems out of the ordinary.

Comments (5)

  1. Ton Plomp reporter

    No, the tables are all in MyASIM 10 Do I have to change the configuration, or the databases?

  2. Log in to comment