mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-30 09:26:00 -04:00
zmupdate.pl reruns migrations where the file version is >= the current DB version, so once the DB reaches 1.39.10 the script fires again. The unconditional ALTER TABLE Logs ADD/DROP INDEX statements failed on the second run with "Duplicate key name". Guard both Logs index changes with INFORMATION_SCHEMA.STATISTICS checks (same pattern used for the Sessions index), and DEALLOCATE PREPARE after each block so prepared-statement names don't accumulate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>