Bugzilla – Attachment 186685 Details for
Bug 35380
PUT /biblios/:biblio_id doesn't respect overlay rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35380: Fix atomicupdate default values
Bug-35380-Fix-atomicupdate-default-values.patch (text/plain), 2.81 KB, created by
Jan Kissig
on 2025-09-22 12:44:42 UTC
(
hide
)
Description:
Bug 35380: Fix atomicupdate default values
Filename:
MIME Type:
Creator:
Jan Kissig
Created:
2025-09-22 12:44:42 UTC
Size:
2.81 KB
patch
obsolete
>From 0c9c4be87dbb85427bc6d471b4c82c4d3775479c Mon Sep 17 00:00:00 2001 >From: Jan Kissig <bibliothek@th-wildau.de> >Date: Mon, 22 Sep 2025 12:38:33 +0000 >Subject: [PATCH] Bug 35380: Fix atomicupdate default values > >This sets can_be_edited to 1 for the predefined record sources >--- > .../data/mysql/atomicupdate/bug_35380.pl | 43 +++++++++++-------- > 1 file changed, 25 insertions(+), 18 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_35380.pl b/installer/data/mysql/atomicupdate/bug_35380.pl >index 5f967cfed69..3d112ed43d0 100644 >--- a/installer/data/mysql/atomicupdate/bug_35380.pl >+++ b/installer/data/mysql/atomicupdate/bug_35380.pl >@@ -1,36 +1,43 @@ > use Modern::Perl; > > return { >- bug_number => "35380", >- description => "Add new unique name to record sources, add default record sources, add is_system column to default record sources.", >+ bug_number => "35380", >+ description => >+ "Add new unique name to record sources, add default record sources, add is_system column to default record sources.", > up => sub { > my ($args) = @_; >- my ($dbh, $out) = @$args{qw(dbh out)}; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; > > # change name to be unique >- if ( !unique_key_exists('record_sources', 'name') ) { >- $dbh->do(q{ >+ if ( !unique_key_exists( 'record_sources', 'name' ) ) { >+ $dbh->do( >+ q{ > ALTER TABLE record_sources > ADD UNIQUE KEY name (`name`) >- }); >+ } >+ ); > say $out "Added unique key 'name' "; > } >- >+ > # add column is system >- unless ( column_exists('record_sources', 'is_system') ) { >- $dbh->do(q{ ALTER TABLE record_sources ADD COLUMN `is_system` TINYINT(1) NOT NULL DEFAULT 0 AFTER can_be_edited }); >- say $out "Added column 'record_sources.is_system'"; >+ unless ( column_exists( 'record_sources', 'is_system' ) ) { >+ $dbh->do( >+ q{ ALTER TABLE record_sources ADD COLUMN `is_system` TINYINT(1) NOT NULL DEFAULT 0 AFTER can_be_edited } >+ ); >+ say $out "Added column 'record_sources.is_system'"; > } > >- $dbh->do(q{ >+ $dbh->do( >+ q{ > INSERT IGNORE INTO record_sources ( name, can_be_edited, is_system ) > VALUES >- ('batchmod', 0, 1 ), >- ('intranet', 0, 1 ), >- ('batchimport', 0, 1 ), >- ('z3950', 0, 1 ), >- ('bulkmarcimport', 0, 1 ), >- ('import_lexile', 0, 1 ) >- }); >+ ('batchmod', 1, 1 ), >+ ('intranet', 1, 1 ), >+ ('batchimport', 1, 1 ), >+ ('z3950', 1, 1 ), >+ ('bulkmarcimport', 1, 1 ), >+ ('import_lexile', 1, 1 ) >+ } >+ ); > }, > }; >-- >2.39.5
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 35380
:
175800
|
175801
|
175802
|
175803
|
186681
|
186682
|
186683
|
186684
| 186685