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 12593-12598 if ( CheckVersion($DBversion) ) { Link Here
12593
    SetVersion($DBversion);
12593
    SetVersion($DBversion);
12594
}
12594
}
12595
12595
12596
$DBversion = "3.23.00.XXX";
12597
if ( CheckVersion($DBversion) ) {
12598
    $dbh->do(q|
12599
ALTER TABLE borrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12600
    |);
12601
    $dbh->do(q|
12602
ALTER TABLE deletedborrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12603
    |);
12604
    print "Upgrade to $DBversion done (Bug 10459: Borrowers should have a timestamp)\n";
12605
    SetVersion($DBversion);
12606
}
12607
12596
12608
12597
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12609
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12598
# SEE bug 13068
12610
# SEE bug 13068
12599
- 

Return to bug 10459