error populating database

Asked by stef

I have 1.0.6, trying to go to 1.2.0-rc2 and i get :

An error occured populating the database.

MySQL Error:
The query [ALTER TABLE `lkdisplaydg` ADD CONSTRAINT `lkdisplaydg_ibfk_1` FOREIGN KEY (`DisplayGroupID`) REFERENCES `displaygroup` (`DisplayGroupID`), ADD CONSTRAINT `lkdisplaydg_ibfk_2` FOREIGN KEY (`DisplayID`) REFERENCES `display` (`displayid`)] failed to execute
MySQL error: Can't create table 'xibo.#sql-4da_425c' (errno: 150)

SQL executed:
ALTER TABLE `lkdisplaydg` ADD CONSTRAINT `lkdisplaydg_ibfk_1` FOREIGN KEY (`DisplayGroupID`) REFERENCES `displaygroup` (`DisplayGroupID`), ADD CONSTRAINT `lkdisplaydg_ibfk_2` FOREIGN KEY (`DisplayID`) REFERENCES `display` (`displayid`)

Statement number: 8

i remember trying to go to 1.0.8 too, after restoring from a backup, and i'm not 100% sure but i'm pretty certain i got the same error.

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
stef
Solved:
Last query:
Last reply:
Revision history for this message
Dan Garner (dangarner) said :
#1

That is rather odd... its basically saying that the foreign key constraints aren't properly formed.... what version of MySQL do you have?

Revision history for this message
stef (stephane-quimpere) said :
#2

MySQL client version: 5.1.37

Revision history for this message
Dan Garner (dangarner) said :
#3

As we said on MSN earlier, if you could try:
a) Commenting out those two lines from the relevant install/database/n.sql
file and running the upgrade again
b) Running the upgrade on a different mysql install
c) Sending us a dump of your pre-upgrade DB so we can try it out.

Revision history for this message
stef (stephane-quimpere) said :
#4

Sending you my sql dump from phpmyadmin. Version is 1.0.6. Like i said on MSN, commenting constraints it works but my layouts don't load on client.
Client tried was 1.2.0 RC2 and server upgrade tested was same version, 1.2.0RC2

Revision history for this message
Dan Garner (dangarner) said :
#5

OK Stef, I will run an upgrade on your DB at my end and see what occurs.

Revision history for this message
stef (stephane-quimpere) said :
#6

Ok so from i can understand off my RSS reader, scratch 1.2.0RC2 upgrade, go for 1.2.0 official instead :-D

Revision history for this message
Alex Harrington (alexharrington) said :
#7

You can try.

I don't know if Dan got anywhere with your data.

Alex

Revision history for this message
stef (stephane-quimpere) said :
#8

Hey thanks Alex. You seem to have fixed it, the updated file you sent me via email fixed it. (The pre-upgraded 1.2.0 sql file)