Bugzilla – Attachment 170108 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), 3.77 KB, created by
Eric Garcia
on 2024-08-06 18:00:30 UTC
(
hide
)
Description:
Bug 33641: DB update
Filename:
MIME Type:
Creator:
Eric Garcia
Created:
2024-08-06 18:00:30 UTC
Size:
3.77 KB
patch
obsolete
>From f883f95ecfca72e13afd43a9a9926a24c5e74d96 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 6 Aug 2024 17:37:12 +0000 >Subject: [PATCH] Bug 33641: DB update > >--- > .../data/mysql/atomicupdate/bug_33641.pl | 35 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 37 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_33641.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33641.pl b/installer/data/mysql/atomicupdate/bug_33641.pl >new file mode 100755 >index 0000000000..e738d50a0a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33641.pl >@@ -0,0 +1,35 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "33641", >+ description => "Added issues.return_branch and old_issues.return_branch", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'issues', 'return_branch' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE issues >+ ADD COLUMN return_branch varchar(10) DEFAULT NULL >+ COMMENT 'foreign key, linking to the branches table for the location the item was returned' >+ AFTER returndate >+ } >+ ); >+ say_success( $out, "Added column 'issues.return_branch'" ); >+ } >+ if ( !column_exists( 'old_issues', 'return_branch' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE old_issues >+ ADD COLUMN return_branch varchar(10) DEFAULT NULL >+ COMMENT 'foreign key, linking to the branches table for the location the item was returned' >+ AFTER returndate >+ } >+ ); >+ say_success( $out, "Added column 'old_issues.return_branch'" ); >+ } >+ >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 07b1e78e1f..53c1fc45b8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3879,6 +3879,7 @@ CREATE TABLE `issues` ( > `date_due` datetime DEFAULT NULL COMMENT 'datetime the item is due (yyyy-mm-dd hh:mm::ss)', > `branchcode` varchar(10) DEFAULT NULL COMMENT 'foreign key, linking to the branches table for the location the item was checked out', > `returndate` datetime DEFAULT NULL COMMENT 'date the item was returned, will be NULL until moved to old_issues', >+ `return_branch` varchar(10) DEFAULT NULL COMMENT 'foreign key, linking to the branches table for the location the item was returned', > `lastreneweddate` datetime DEFAULT NULL COMMENT 'date the item was last renewed', > `renewals_count` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'lists the number of times the item was renewed', > `unseen_renewals` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'lists the number of consecutive times the item was renewed without being seen', >@@ -4881,6 +4882,7 @@ CREATE TABLE `old_issues` ( > `date_due` datetime DEFAULT NULL COMMENT 'date the item is due (yyyy-mm-dd)', > `branchcode` varchar(10) DEFAULT NULL COMMENT 'foreign key, linking to the branches table for the location the item was checked out', > `returndate` datetime DEFAULT NULL COMMENT 'date the item was returned', >+ `return_branch` varchar(10) DEFAULT NULL COMMENT 'foreign key, linking to the branches table for the location the item was returned', > `lastreneweddate` datetime DEFAULT NULL COMMENT 'date the item was last renewed', > `renewals_count` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'lists the number of times the item was renewed', > `unseen_renewals` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'lists the number of consecutive times the item was renewed without being seen', >-- >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