Bugzilla – Attachment 148294 Details for
Bug 24718
Introduce hour-based holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24718: Modify reserves.reservedate and expirationdate to use datetime
Bug-24718-Modify-reservesreservedate-and-expiratio.patch (text/plain), 5.40 KB, created by
Aleisha Amohia
on 2023-03-16 23:23:21 UTC
(
hide
)
Description:
Bug 24718: Modify reserves.reservedate and expirationdate to use datetime
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-03-16 23:23:21 UTC
Size:
5.40 KB
patch
obsolete
>From 6e9be7852877607c3fcf3333c170aaa8ad462f8d Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 20 Oct 2021 10:57:39 +1300 >Subject: [PATCH] Bug 24718: Modify reserves.reservedate and expirationdate to > use datetime > >--- > .../bug_24718_-_use_datetime_for_reserves.perl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 8 ++++---- > 2 files changed, 17 insertions(+), 4 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_24718_-_use_datetime_for_reserves.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24718_-_use_datetime_for_reserves.perl b/installer/data/mysql/atomicupdate/bug_24718_-_use_datetime_for_reserves.perl >new file mode 100644 >index 00000000000..ea67b201ca2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24718_-_use_datetime_for_reserves.perl >@@ -0,0 +1,13 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ if( column_exists( 'reserves', 'reservedate' ) ) { >+ $dbh->do(q{ALTER TABLE reserves MODIFY column reservedate datetime}); >+ } >+ >+ if( column_exists( 'reserves', 'expirationdate' ) ) { >+ $dbh->do(q{ALTER TABLE reserves MODIFY column expirationdate datetime}); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 24718 - Use datetime for reserves.reservedate and reserves.expirationdate)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a3faa37d794..568d1c5fa5d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4471,7 +4471,7 @@ DROP TABLE IF EXISTS `old_reserves`; > CREATE TABLE `old_reserves` ( > `reserve_id` int(11) NOT NULL COMMENT 'primary key', > `borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', >- `reservedate` date DEFAULT NULL COMMENT 'the date the hold was places', >+ `reservedate` datetime DEFAULT NULL COMMENT 'the date the hold was places', > `biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', > `item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', >@@ -4486,7 +4486,7 @@ CREATE TABLE `old_reserves` ( > `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', > `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', > `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', >- `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)', >+ `expirationdate` datetime 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)', > `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', > `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)', > `suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)', >@@ -4920,7 +4920,7 @@ DROP TABLE IF EXISTS `reserves`; > CREATE TABLE `reserves` ( > `reserve_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', > `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for', >- `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed', >+ `reservedate` datetime DEFAULT NULL COMMENT 'the date the hold was placed', > `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on', > `item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold', > `branchcode` varchar(10) NOT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', >@@ -4935,7 +4935,7 @@ CREATE TABLE `reserves` ( > `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', > `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', > `waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', >- `expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (calculated value)', >+ `expirationdate` datetime DEFAULT NULL COMMENT 'the date the hold expires (calculated value)', > `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', > `lowestPriority` tinyint(1) NOT NULL DEFAULT 0, > `suspend` tinyint(1) NOT NULL DEFAULT 0, >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24718
:
99540
|
99541
|
99542
|
99543
|
99544
|
99545
|
99548
|
103521
|
103522
|
103549
|
103550
|
103551
|
103552
|
103553
|
103554
|
103555
|
106270
|
106271
|
106272
|
106273
|
106274
|
106275
|
110084
|
110085
|
110086
|
110087
|
110088
|
110089
|
110090
|
110091
|
110098
|
110137
|
110161
|
110303
|
126559
|
126560
|
126561
|
126562
|
126563
|
126564
|
148293
|
148294
|
148295
|
148296
|
148297
|
148298
|
162474
|
162475
|
162476
|
162477
|
162478
|
162479