Recent Topics

check database before upgrading it

Started by on Jan 21, 2008 – Contents updated: Jan 21, 2008

Jan 21, 2008 21:46    

Hello,

When using the upgrade script, sometimes it fails. And sometimes it fails because of database error. Some errors could be detected using mysql "check table".
If "check table" detect any error, we must stop the upgrading process and advice the user to check/analyse then repair the tables.

Example of error when trying to update from [url=http://forums.b2evolution.net/viewtopic.php?t=13977]b2evo 1.8.x[/url]:

Duplicate key name ...


When you do a check table on this table you got the error:

PRIMARY and INDEX keys should not both be set for column ...

I think it will be better to do a check (mysql analyse/optimise/repair) on all tables, then stop the update process and alert the user.


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.