Bugzilla – Attachment 101093 Details for
Bug 23092
Add 'daterequested' to the transfers table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23092: Add 'daterequested' to branchtransfers table
Bug-23092-Add-daterequested-to-branchtransfers-tab.patch (text/plain), 3.48 KB, created by
Martin Renvoize (ashimema)
on 2020-03-20 12:31:56 UTC
(
hide
)
Description:
Bug 23092: Add 'daterequested' to branchtransfers table
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-20 12:31:56 UTC
Size:
3.48 KB
patch
obsolete
>From 2e16a433c8dac79d9e3c442edb0f2d10a568822a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 17 Jan 2020 12:04:07 +0000 >Subject: [PATCH] Bug 23092: Add 'daterequested' to branchtransfers table > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Schema/Result/Branchtransfer.pm | 18 ++++++++++++++++-- > .../data/mysql/atomicupdate/bug_23092.perl | 18 ++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 3 files changed, 35 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23092.perl > >diff --git a/Koha/Schema/Result/Branchtransfer.pm b/Koha/Schema/Result/Branchtransfer.pm >index a2f63b81c0..7fc813e507 100644 >--- a/Koha/Schema/Result/Branchtransfer.pm >+++ b/Koha/Schema/Result/Branchtransfer.pm >@@ -36,6 +36,13 @@ __PACKAGE__->table("branchtransfers"); > is_foreign_key: 1 > is_nullable: 0 > >+=head2 daterequested >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ > =head2 datesent > > data_type: 'datetime' >@@ -87,6 +94,13 @@ __PACKAGE__->add_columns( > is_foreign_key => 1, > is_nullable => 0, > }, >+ "daterequested", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, > "datesent", > { > data_type => "datetime", >@@ -197,8 +211,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-20 11:24:33 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:50FpCj6vWH5O8MThCy/1hA >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-20 12:30:59 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:G5GZTxF8X/mcIKXmuGVWIQ > > sub koha_object_class { > 'Koha::Item::Transfer'; >diff --git a/installer/data/mysql/atomicupdate/bug_23092.perl b/installer/data/mysql/atomicupdate/bug_23092.perl >new file mode 100644 >index 0000000000..a704bab866 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23092.perl >@@ -0,0 +1,18 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ unless ( column_exists('branchtransfers', 'daterequested') ) { >+ $dbh->do( >+ qq{ >+ ALTER TABLE branchtransfers >+ ADD >+ `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP >+ AFTER >+ `itemnumber` >+ } >+ ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23092 - Add 'daterequested' field to transfers table)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6495f25bbd..8da866c4fb 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -901,6 +901,7 @@ DROP TABLE IF EXISTS `branchtransfers`; > CREATE TABLE `branchtransfers` ( -- information for items that are in transit between branches > `branchtransfer_id` int(12) NOT NULL auto_increment, -- primary key > `itemnumber` int(11) NOT NULL default 0, -- the itemnumber that it is in transit (items.itemnumber) >+ `daterequested` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date the transfer was requested > `datesent` datetime default NULL, -- the date the transfer was initialized > `frombranch` varchar(10) NOT NULL default '', -- the branch the transfer is coming from > `datearrived` datetime default NULL, -- the date the transfer arrived at its destination >-- >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 23092
:
97512
|
97542
|
100631
|
101093
|
105912
|
105913
|
105916
|
105917
|
106609
|
106610
|
107238
|
107239