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

(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 618-623 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
618
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
618
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
619
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
619
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
620
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
620
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
621
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
621
  KEY borrowernumber (borrowernumber),
622
  KEY borrowernumber (borrowernumber),
622
  KEY `cardnumber` (`cardnumber`),
623
  KEY `cardnumber` (`cardnumber`),
623
  KEY `sms_provider_id` (`sms_provider_id`)
624
  KEY `sms_provider_id` (`sms_provider_id`)
Lines 1623-1628 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
1623
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
1624
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
1624
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
1625
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
1625
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
1626
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
1627
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- time of last change could be useful for synchronization with external systems (among others)
1626
  UNIQUE KEY `cardnumber` (`cardnumber`),
1628
  UNIQUE KEY `cardnumber` (`cardnumber`),
1627
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1629
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
1628
  KEY `categorycode` (`categorycode`),
1630
  KEY `categorycode` (`categorycode`),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +12 lines)
Lines 12599-12604 if ( CheckVersion($DBversion) ) { Link Here
12599
    SetVersion($DBversion);
12599
    SetVersion($DBversion);
12600
}
12600
}
12601
12601
12602
$DBversion = "3.23.00.XXX";
12603
if ( CheckVersion($DBversion) ) {
12604
    $dbh->do(q|
12605
ALTER TABLE borrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12606
    |);
12607
    $dbh->do(q|
12608
ALTER TABLE deletedborrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12609
    |);
12610
    print "Upgrade to $DBversion done (Bug 10459: Borrowers should have a timestamp)\n";
12611
    SetVersion($DBversion);
12612
}
12613
12602
12614
12603
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12615
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12604
# SEE bug 13068
12616
# SEE bug 13068
12605
- 

Return to bug 10459