Bug 21336: Database revision for borrowers.flgAnonymized

This new flag should speak for itself ;)

Test plan:
Run installer or updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2018-09-19 16:56:16 +02:00 committed by Nick Clemens
parent 4b3eb99ad6
commit 3b62cbb17b
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,7 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" );
$dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n";
}

View File

@ -609,6 +609,7 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower
`lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
`login_attempts` int(4) default 0, -- number of failed login attemps
`overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
`flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization
KEY borrowernumber (borrowernumber),
KEY `cardnumber` (`cardnumber`),
KEY `sms_provider_id` (`sms_provider_id`)
@ -1643,6 +1644,7 @@ CREATE TABLE `borrowers` ( -- this table includes information about your patrons
`lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
`login_attempts` int(4) default 0, -- number of failed login attemps
`overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
`flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization
UNIQUE KEY `cardnumber` (`cardnumber`),
PRIMARY KEY `borrowernumber` (`borrowernumber`),
KEY `categorycode` (`categorycode`),