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

(-)a/installer/data/mysql/atomicupdate/bug_21729.pl (+25 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "21729",
5
    description => "Add new column reserves.patron_expiration_date",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless( column_exists('reserves', 'patron_expiration_date') ) {
10
            $dbh->do(q{
11
                ALTER TABLE reserves
12
                ADD COlUMN patron_expiration_date date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date'
13
                AFTER expirationdate
14
            });
15
        }
16
        unless( column_exists('old_reserves', 'patron_expiration_date') ) {
17
            $dbh->do(q{
18
                ALTER TABLE old_reserves
19
                ADD COlUMN patron_expiration_date date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date'
20
                AFTER expirationdate
21
            });
22
        }
23
24
    },
25
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 3875-3880 CREATE TABLE `old_reserves` ( Link Here
3875
  `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with',
3875
  `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with',
3876
  `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library',
3876
  `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library',
3877
  `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)',
3877
  `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)',
3878
  `patron_expiration_date` date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date',
3878
  `lowestPriority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)',
3879
  `lowestPriority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)',
3879
  `suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)',
3880
  `suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)',
3880
  `suspend_until` datetime DEFAULT NULL COMMENT 'the date this hold is suspended until (NULL for infinitely)',
3881
  `suspend_until` datetime DEFAULT NULL COMMENT 'the date this hold is suspended until (NULL for infinitely)',
Lines 4317-4323 CREATE TABLE `reserves` ( Link Here
4317
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated',
4318
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated',
4318
  `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with',
4319
  `itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with',
4319
  `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library',
4320
  `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library',
4320
  `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)',
4321
  `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (calculated value)',
4322
  `patron_expiration_date` date DEFAULT NULL COMMENT 'the date the hold expires - usually the date entered by the patron to say they don''t need the hold after a certain date',
4321
  `lowestPriority` tinyint(1) NOT NULL DEFAULT 0,
4323
  `lowestPriority` tinyint(1) NOT NULL DEFAULT 0,
4322
  `suspend` tinyint(1) NOT NULL DEFAULT 0,
4324
  `suspend` tinyint(1) NOT NULL DEFAULT 0,
4323
  `suspend_until` datetime DEFAULT NULL,
4325
  `suspend_until` datetime DEFAULT NULL,
4324
- 

Return to bug 21729