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

(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 266-271 CREATE TABLE `borrowers` ( -- this table includes information about your patrons Link Here
266
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
266
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
267
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
267
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history
268
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
268
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
269
  `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)
269
  UNIQUE KEY `cardnumber` (`cardnumber`),
270
  UNIQUE KEY `cardnumber` (`cardnumber`),
270
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
271
  PRIMARY KEY `borrowernumber` (`borrowernumber`),
271
  KEY `categorycode` (`categorycode`),
272
  KEY `categorycode` (`categorycode`),
Lines 918-923 CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower Link Here
918
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
919
  `sms_provider_id` int(11) DEFAULT NULL, -- the provider of the mobile phone number defined in smsalertnumber
919
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
920
  `privacy` integer(11) DEFAULT '1' NOT NULL, -- patron/borrower's privacy settings related to their reading history  KEY `borrowernumber` (`borrowernumber`),
920
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
921
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT '0', -- controls if relatives can see this patron's checkouts
922
  `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)
921
  KEY borrowernumber (borrowernumber),
923
  KEY borrowernumber (borrowernumber),
922
  KEY `cardnumber` (`cardnumber`),
924
  KEY `cardnumber` (`cardnumber`),
923
  KEY `sms_provider_id` (`sms_provider_id`)
925
  KEY `sms_provider_id` (`sms_provider_id`)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +14 lines)
Lines 12219-12224 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
12219
    print "Upgrade to $DBversion done (Bug 15008 - Add custom HTML areas to circulation and reports home pages)\n";
12219
    print "Upgrade to $DBversion done (Bug 15008 - Add custom HTML areas to circulation and reports home pages)\n";
12220
    SetVersion($DBversion);
12220
    SetVersion($DBversion);
12221
}
12221
}
12222
12223
$DBversion = "3.23.00.XXX";
12224
if ( CheckVersion($DBversion) ) {
12225
    $dbh->do(q|
12226
ALTER TABLE borrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12227
    |);
12228
    $dbh->do(q|
12229
ALTER TABLE deletedborrowers ADD COLUMN timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER privacy;
12230
    |);
12231
    print "Upgrade to $DBversion done (Bug 10459: Borrowers should have a timestamp)\n";
12232
    SetVersion($DBversion);
12233
}
12234
12235
12222
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12236
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12223
# SEE bug 13068
12237
# SEE bug 13068
12224
# if there is anything in the atomicupdate, read and execute it.
12238
# if there is anything in the atomicupdate, read and execute it.
12225
- 

Return to bug 10459