Bug 23049: (follow-up) Handle unexpected types
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
cf1904bb08
commit
f046b5073e
|
|
@ -105,6 +105,29 @@ if ( CheckVersion($DBversion) ) {
|
|||
}
|
||||
);
|
||||
|
||||
# Add any unexpected accounttype codes to debit_types as appropriate
|
||||
$dbh->do(
|
||||
qq{
|
||||
INSERT IGNORE INTO account_debit_types (
|
||||
code,
|
||||
description,
|
||||
can_be_added_manually,
|
||||
default_amount,
|
||||
is_system
|
||||
)
|
||||
SELECT
|
||||
SUBSTR(accounttype, 1, 80),
|
||||
"Unexpected type found during upgrade",
|
||||
1,
|
||||
NULL,
|
||||
0
|
||||
FROM
|
||||
accountlines
|
||||
WHERE
|
||||
amount > 0
|
||||
}
|
||||
);
|
||||
|
||||
# Adding debit_type_code to accountlines
|
||||
unless ( column_exists('accountlines', 'debit_type_code') ) {
|
||||
$dbh->do(
|
||||
|
|
|
|||
Loading…
Reference in New Issue