ispCP - Board - Support
RC2c to RC3 Database update fail primary key - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Update/Upgrade (/forum-44.html)
+--- Thread: RC2c to RC3 Database update fail primary key (/thread-2517.html)



RC2c to RC3 Database update fail primary key - achioo - 02-21-2008 10:48 AM

Get the following error when running the update script.
Code:
Upgrading database structure...ERROR 1068 (42000) at line 54: Multiple primary key defined failed!

SQL Update failed.



RE: RC2c to RC3 Database update fail primary key - juerg - 02-21-2008 05:54 PM

achioo Wrote:Get the following error when running the update script.
Code:
Upgrading database structure...ERROR 1068 (42000) at line 54: Multiple primary key defined failed!

SQL Update failed.

Delete this line 54 in your update-file. (/var/www/ispcp/engine/setup/ispcp1.0.0rc2-ispcp.sql) Then update again. If you got another fail like this, delete again... and again...
It worked here :-)

juerg


RE: RC2c to RC3 Database update fail primary key - joximu - 02-21-2008 07:21 PM

or add an "IGNORE" on the right places in the sql statements...

in general - use the search function of the forum


RE: RC2c to RC3 Database update fail primary key - achioo - 02-22-2008 02:49 AM

joximu from reading what you said about "IGNORE" it appeared that it would only work with inserts... It wasn't an insert that was the issue but an alter. So I just amended the .sql file and added a -- before each line that broke it. Everything ran fine after that.


RE: RC2c to RC3 Database update fail primary key - joximu - 02-22-2008 02:55 AM

ok, sure. You're right. Ignore was for the inserts....

But you had a newer version than rc2c, right? otherwise the db update should have gone through without problems...


RE: RC2c to RC3 Database update fail primary key - achioo - 02-22-2008 03:03 AM

nope I had rc2c... I didn't/wouldn't upgrade to nightly... would be too painful... but in the end it worked so all is not lost.