Bugzilla – Attachment 170105 Details for
Bug 33641
We should record return library in old checkouts (oldissues)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33641: DB Update
Bug-33641-DB-Update.patch (text/plain), 4.09 KB, created by
Eric Garcia
on 2024-08-06 17:11:34 UTC
(
hide
)
Description:
Bug 33641: DB Update
Filename:
MIME Type:
Creator:
Eric Garcia
Created:
2024-08-06 17:11:34 UTC
Size:
4.09 KB
patch
obsolete
>From d9bd25552b4fdfc937cd4b6631666f18a3596fb4 Mon Sep 17 00:00:00 2001 >From: Eric Garcia <cubingguy714@gmail.com> >Date: Tue, 6 Aug 2024 16:09:09 +0000 >Subject: [PATCH] Bug 33641: DB Update > >Added return_branch to issues table and old_issues table >--- > Koha/Schema/Result/Issue.pm | 14 ++++++++++++-- > Koha/Schema/Result/OldIssue.pm | 14 ++++++++++++-- > installer/data/mysql/atomicupdate/bug_33641.pl | 8 ++++---- > 3 files changed, 28 insertions(+), 8 deletions(-) > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_33641.pl > >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 05fde17f46..89c9f692d9 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -79,6 +79,14 @@ foreign key, linking to the branches table for the location the item was checked > > date the item was returned, will be NULL until moved to old_issues > >+=head2 return_branch >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 10 >+ >+foreign key, linking to the branches table for the location the item was checked out >+ > =head2 lastreneweddate > > data_type: 'datetime' >@@ -191,6 +199,8 @@ __PACKAGE__->add_columns( > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >+ "return_branch", >+ { data_type => "varchar", is_nullable => 1, size => 10 }, > "lastreneweddate", > { > data_type => "datetime", >@@ -311,8 +321,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-12 11:34:50 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eNzDAKc3bmTLWeDu8u4nTQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-08-06 16:06:37 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hSiUDS3csy2TMnMIhHrl0g > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index 50ef4a82e0..ae4e8c3e7f 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -78,6 +78,14 @@ foreign key, linking to the branches table for the location the item was checked > > date the item was returned > >+=head2 return_branch >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 10 >+ >+foreign key, linking to the branches table for the location the item was checked out >+ > =head2 lastreneweddate > > data_type: 'datetime' >@@ -190,6 +198,8 @@ __PACKAGE__->add_columns( > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >+ "return_branch", >+ { data_type => "varchar", is_nullable => 1, size => 10 }, > "lastreneweddate", > { > data_type => "datetime", >@@ -306,8 +316,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-18 12:35:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0XlDHyg8uB3oD9/jJtOxRg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-08-06 16:06:37 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gUCScHz5jPId/nP/IJJHVg > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >diff --git a/installer/data/mysql/atomicupdate/bug_33641.pl b/installer/data/mysql/atomicupdate/bug_33641.pl >old mode 100644 >new mode 100755 >index d5f8361746..d065078b6c >--- a/installer/data/mysql/atomicupdate/bug_33641.pl >+++ b/installer/data/mysql/atomicupdate/bug_33641.pl >@@ -5,13 +5,13 @@ return { > bug_number => "33641", > description => "Added issues.return_branch and old_issues.return_branch", > up => sub { >- my ($args) = @_; >+ my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > >- if( !column_exists( 'issues', 'return_branch' ) ) { >+ if( !column_exists( 'issues', 'return_branch' ) ) { > $dbh->do(q{ > ALTER TABLE issues >- ADD COLUMN return_branch varchar(10) DEFAULT NULL >+ ADD COLUMN return_branch varchar(10) DEFAULT NULL > COMMENT 'foreign key, linking to the branches table for the location the item was checked out' > AFTER returndate > }); >@@ -28,5 +28,5 @@ return { > say_success( $out, "Added column 'old_issues.return_branch'"); > } > >- }, >+ }, > }; >-- >2.30.2
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 33641
:
170105
|
170106
|
170107
|
170108
|
170109
|
170110
|
170111
|
170138
|
170139
|
170140
|
170141
|
173562
|
173563
|
173564
|
173565
|
174510
|
174511
|
174512
|
174513
|
174514
|
174536
|
174538
|
174569
|
174570
|
174571
|
174572
|
174573
|
174574
|
174584
|
174585