Error upgrading to 1.3.0. DB never updated

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
NetVicious
Posts: 2
Joined: 13 Jul 2016, 08:50

Error upgrading to 1.3.0. DB never updated

Post by NetVicious »

Hi!

I upgraded to 1.3.0 minutes ago. It seems there is a little problem with the database upgrade.

I checked the option to see the SQL sentences it uses and the last sql sentence it's wrong for updates:

Code: Select all

INSERT INTO mantis_config_table ( value, type, access_reqd, config_id, project_id, user_id ) VALUES ('209', 1, 90, 'database_version', 0, 0 );
If we're upgrading a old mantis we will get this error:

Code: Select all

/* Error de SQL (1062): Duplicate entry 'database_version-0-0' for key 'PRIMARY' */
The previous sentence should be changed to the next one adding ON DUPLICATE ....:

Code: Select all

INSERT INTO mantis_config_table ( value, type, access_reqd, config_id, project_id, user_id ) VALUES ('209', 1, 90, 'database_version', 0, 0 ) ON DUPLICATE KEY UPDATE value='209';
Post Reply