Bug 22512: Add status field to accountlines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2019-03-14 12:14:17 +00:00 committed by Nick Clemens
parent 41e0ff7cd6
commit b763b4698b
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
$DBversion = 'XXX'; # will be replaced by the RM
if ( CheckVersion($DBversion) ) {
if ( !column_exists( 'accountlines', 'status' ) ) {
$dbh->do(
qq{
ALTER TABLE `accountlines`
ADD
`status` varchar(16) DEFAULT NULL
AFTER
`accounttype`
}
);
}
SetVersion($DBversion);
print "Upgrade to $DBversion done (Bug 22512 - Add status to accountlines)\n";
}

View File

@ -2677,6 +2677,7 @@ CREATE TABLE `accountlines` (
`amount` decimal(28,6) default NULL,
`description` LONGTEXT,
`accounttype` varchar(5) default NULL,
`status` varchar(16) default NULL,
`payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE
`amountoutstanding` decimal(28,6) default NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,