ZoneMinder/ZoneMinder — pull request #82 by knnniggett (2013-08-18 22:31:33+00:00)
Title: Update zmupdate.pl.in

Discovered an issue testing a database upgrade from 1.24.4 to 1.26.0. The 1.26 upgrade would ignore supplied credentials and would only run with the default zmuser credentials. This caused the upgrade to fail because zmuser does not have the ALTER dB permission.

Further investigation revealed the patchDB() function, which appears to do all the hard work for us. I'm not a Perl expert, but if I understand correctly the block of code that Isaac recently wrote can be replaced by a call to PatchDB as shown. The PatchDB function will make use of --user & --pass if they are supplied. Note that this commit depends on commit 29ec57f. https://github.com/knnniggett/ZoneMinder/commit/29ec57f64e67cc23ff358bfe079d0ec1ed6abe96