projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b3b6d07
)
fix password_history upgrade on new DBs
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Sep 2022 23:50:33 +0000
(16:50 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Sep 2022 23:50:33 +0000
(16:50 -0700)
FS/FS/password_history.pm
patch
|
blob
|
history
diff --git
a/FS/FS/password_history.pm
b/FS/FS/password_history.pm
index
13d1601
..
1915a21
100644
(file)
--- 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) )";
}
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),
my @recs = qsearch({
'table' => 'password_history',
'extra_sql' => ' WHERE ' . join(' AND ', @where),