Bugzilla – Attachment 100250 Details for
Bug 24818
Accountline creation dates should be datetimes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24818: Update database accountlines.date to timestamp
Bug-24818-Update-database-accountlinesdate-to-time.patch (text/plain), 1.78 KB, created by
Martin Renvoize (ashimema)
on 2020-03-06 11:22:14 UTC
(
hide
)
Description:
Bug 24818: Update database accountlines.date to timestamp
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-06 11:22:14 UTC
Size:
1.78 KB
patch
obsolete
>From ee5bfeddc1f570f0d30ec0aa4235127b8f992264 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 6 Mar 2020 11:20:51 +0000 >Subject: [PATCH] Bug 24818: Update database accountlines.date to timestamp > >This update increases the resolution for the 'date' field, used for >'creation date' in accountlines from a 'date' to a 'timestamp'. > >This matches other tables where both a created and updated field are >included. >--- > installer/data/mysql/atomicupdate/bug_24818.perl | 8 ++++++++ > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 9 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_24818.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24818.perl b/installer/data/mysql/atomicupdate/bug_24818.perl >new file mode 100644 >index 0000000000..773f65d2b4 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24818.perl >@@ -0,0 +1,8 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ $dbh->do( "ALTER TABLE accountlines MODIFY COLUMN date TIMESTAMP NULL" ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 24818: Update 'accountlines.date' from DATE to TIMESTAMP)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 5cb56ae2fd..a4202c4df5 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2650,7 +2650,7 @@ CREATE TABLE `accountlines` ( > `issue_id` int(11) NULL DEFAULT NULL, > `borrowernumber` int(11) DEFAULT NULL, > `itemnumber` int(11) default NULL, >- `date` date default NULL, >+ `date` timestamp NULL, > `amount` decimal(28,6) default NULL, > `description` LONGTEXT, > `credit_type_code` varchar(80) default NULL, >-- >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 24818
:
100250
|
100566
|
100821