summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2022-09-07 16:50:33 -0700
committerIvan Kohler <ivan@freeside.biz>2022-09-07 16:50:33 -0700
commit691de38ac2ca6c54b37feb50e1332bab6268773f (patch)
treea455e15917b590ef4b3e5f175d91e2725d0d2859
parentb3b6d0750030d08032756ad4a6969e193a65a928 (diff)
fix password_history upgrade on new DBs
-rw-r--r--FS/FS/password_history.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/password_history.pm b/FS/FS/password_history.pm
index 13d1601..1915a21 100644
--- a/FS/FS/password_history.pm
+++ b/FS/FS/password_history.pm
@@ -173,6 +173,7 @@ sub _upgrade_schema {
push @where, "
( $fk IS NOT NULL AND NOT EXISTS(SELECT 1 FROM $table WHERE $table.$key = $fk) )";
}
+ return '' unless @where;
my @recs = qsearch({
'table' => 'password_history',
'extra_sql' => ' WHERE ' . join(' AND ', @where),