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

(-)a/installer/data/mysql/atomicupdate/bug_23486_set_lastseen_default.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "23486",
5
    description => "Default lastseen to current timestamp",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            ALTER TABLE borrowers CHANGE lastseen
11
            lastseen datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'last time a patron has been seen (connected at the OPAC or staff interface)'
12
            });
13
        say $out "Update lastseen colum to default to current timestamp";
14
    },
15
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 1447-1453 CREATE TABLE `borrowers` ( Link Here
1447
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'controls if relatives can see this patron''s checkouts',
1447
  `privacy_guarantor_checkouts` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'controls if relatives can see this patron''s checkouts',
1448
  `checkprevcheckout` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
1448
  `checkprevcheckout` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
1449
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'time of last change could be useful for synchronization with external systems (among others)',
1449
  `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'time of last change could be useful for synchronization with external systems (among others)',
1450
  `lastseen` datetime DEFAULT NULL COMMENT 'last time a patron has been seen (connected at the OPAC or staff interface)',
1450
  `lastseen` datetime DEFAULT current_timestamp() COMMENT 'last time a patron has been seen (connected at the OPAC or staff interface)',
1451
  `lang` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'lang to use to send notices to this patron',
1451
  `lang` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default' COMMENT 'lang to use to send notices to this patron',
1452
  `login_attempts` int(4) NOT NULL DEFAULT 0 COMMENT 'number of failed login attemps',
1452
  `login_attempts` int(4) NOT NULL DEFAULT 0 COMMENT 'number of failed login attemps',
1453
  `overdrive_auth_token` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'persist OverDrive auth token',
1453
  `overdrive_auth_token` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'persist OverDrive auth token',
1454
- 

Return to bug 23486