cccraig / MugShot

Plugin for piwigo.
MIT License
15 stars 15 forks source link

Make updates more robust #39

Closed amenk closed 1 year ago

amenk commented 2 years ago

During update I ran into an issue

<b>Warning</b>:  [mysql error 1062] Duplicate entry 'MugShot' for key 'PRIMARY'
INSERT INTO piwigo_config (param,value,comment) VALUES ("MugShot","","MugShot configuration values"); in <b>/var/www/virtual/x/html/include/dblayer/functions_mysqli.inc.php</b> on line <b>847</b><br />

I was able to solve it with this patch.

As the following query also works if the table already exists, this seems to be more robust.

plegall commented 1 year ago

@cccraig please merge this PR :-)