Bugzilla – Attachment 194346 Details for
Bug 37346
The VirtualShelf object should have an 'owner' accessor to return the related owner Koha::Patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37346: atomicupdate - DO NOT PUSH
a1b65d9.patch (text/plain), 2.08 KB, created by
Jake Deery
on 2026-03-02 17:56:43 UTC
(
hide
)
Description:
Bug 37346: atomicupdate - DO NOT PUSH
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2026-03-02 17:56:43 UTC
Size:
2.08 KB
patch
obsolete
>From a1b65d90c80906eea847dcf0a0bb895772e7a30a Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Mon, 2 Mar 2026 17:49:57 +0000 >Subject: [PATCH] Bug 37346: atomicupdate - DO NOT PUSH > >--- > .../data/mysql/atomicupdate/bug_37346.pl | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_37346.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37346.pl b/installer/data/mysql/atomicupdate/bug_37346.pl >new file mode 100644 >index 00000000000..6cbe75ba107 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37346.pl >@@ -0,0 +1,43 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "37346", >+ description => "The VirtualShelf object should have an 'owner' accessor to return the related owner Koha::Patron", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'virtualshelves', 'owner_id' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE virtualshelves >+ RENAME COLUMN owner TO owner_id >+ } >+ ); >+ >+ say_success $out, 'Renamed owner column to owner_id in virtualshelves table'; >+ } >+ >+ if ( foreign_key_exists( 'virtualshelves', 'virtualshelves_ibfk_1' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE virtualshelves >+ DROP FOREIGN KEY virtualshelves_ibfk_1 >+ } >+ ); >+ $dbh->do( >+ q{ >+ ALTER TABLE virtualshelves >+ ADD CONSTRAINT virtualshelves_ibfk_1 >+ FOREIGN KEY (`owner_id`) >+ REFERENCES `borrowers` (`borrowernumber`) >+ ON DELETE SET NULL >+ ON UPDATE SET NULL >+ } >+ ); >+ >+ say_success $out, 'Dropped and recreated owner_id foreign key in virtualshelves'; >+ } >+ }, >+}; >-- >2.50.1 (Apple Git-155) >
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 37346
:
170494
|
174478
|
194345
| 194346 |
194347