Skip to content

Commit

Permalink
Always re-apply the latest update. Mainly because sometimes Isaac for…
Browse files Browse the repository at this point in the history
…gets to add the zm_update file when bumping versions, also in release branches, we increment version before release. zm_update scripts are always supposed to be re-runnable, so this is ok, if a little skeezy
  • Loading branch information
Isaac Connor committed Jul 9, 2024
1 parent 7665c63 commit b4c871d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/zmupdate.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ if ( $version ) {
foreach my $patch ( @files ) {
my ( $v ) = $patch =~ /^zm_update\-([\d\.]+)\.sql$/;
#PP make sure we use version compare
if ( version->parse('v'.$v) > version->parse('v'.$version) ) {
if ( version->parse('v'.$v) >= version->parse('v'.$version) ) {
print("Upgrading DB to $v from $version\n");
if ( patchDB($dbh, $v) ) {
my $res = $sth->execute($version) or die( "Can't execute: ".$sth->errstr() );
Expand Down

0 comments on commit b4c871d

Please sign in to comment.