View | Details | Raw Unified | Return to bug 22729
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_21336_followup.perl (+20 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    if ( column_exists( 'borrowers', 'flgAnonymized' ) ) {
5
        $dbh->do(q{
6
            ALTER TABLE borrowers
7
                CHANGE `flgAnonymized` `anonymized` TINYINT(1) NOT NULL DEFAULT 0
8
        });
9
    }
10
11
    if ( column_exists( 'deletedborrowers', 'flgAnonymized' ) ) {
12
        $dbh->do(q{
13
            ALTER TABLE deletedborrowers
14
                CHANGE `flgAnonymized` `anonymized` TINYINT(1) NOT NULL DEFAULT 0
15
        });
16
    }
17
18
    SetVersion( $DBversion );
19
    print "Upgrade to $DBversion done (Bug 21336 - (follow-up) Rename flgAnonymized column)\n";
20
}
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 609-615 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
609
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
609
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
610
  `login_attempts` int(4) default 0, -- number of failed login attemps
610
  `login_attempts` int(4) default 0, -- number of failed login attemps
611
  `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
611
  `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
612
  `flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization
612
  `anonymized` TINYINT(1) NOT NULL DEFAULT 0, -- flag for data anonymization
613
  KEY borrowernumber (borrowernumber),
613
  KEY borrowernumber (borrowernumber),
614
  KEY `cardnumber` (`cardnumber`),
614
  KEY `cardnumber` (`cardnumber`),
615
  KEY `sms_provider_id` (`sms_provider_id`)
615
  KEY `sms_provider_id` (`sms_provider_id`)
Lines 1643-1649 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1643
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
1643
  `lang` varchar(25) NOT NULL default 'default', -- lang to use to send notices to this patron
1644
  `login_attempts` int(4) default 0, -- number of failed login attemps
1644
  `login_attempts` int(4) default 0, -- number of failed login attemps
1645
  `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
1645
  `overdrive_auth_token` MEDIUMTEXT default NULL, -- persist OverDrive auth token
1646
  `flgAnonymized` tinyint DEFAULT 0, -- flag for data anonymization
1646
  `anonymized` TINYINT(1) NOT NULL DEFAULT 0, -- flag for data anonymization
1647
  UNIQUE KEY `cardnumber` (`cardnumber`),
1647
  UNIQUE KEY `cardnumber` (`cardnumber`),
1648
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1648
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1649
  KEY `categorycode` (`categorycode`),
1649
  KEY `categorycode` (`categorycode`),
1650
- 

Return to bug 22729