Bugzilla – Attachment 156030 Details for
Bug 34843
Koha/Database/Commenter.t is failing if the DB has been upgraded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34843: Fix database comment inconsistency on toc_request
Bug-34843-Fix-database-comment-inconsistency-on-to.patch (text/plain), 2.27 KB, created by
Marcel de Rooy
on 2023-09-22 07:39:56 UTC
(
hide
)
Description:
Bug 34843: Fix database comment inconsistency on toc_request
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-22 07:39:56 UTC
Size:
2.27 KB
patch
obsolete
>From f9b7c2e6a3b04499d1fd645d388ae7428be0796e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 22 Sep 2023 07:33:57 +0000 >Subject: [PATCH] Bug 34843: Fix database comment inconsistency on toc_request >Content-Type: text/plain; charset=utf-8 > >Bug 29093 had a dbrev without comment, but added comment to >kohastructure. > >Test plan: >Check (or remove) comment on article_requests.toc_request. >Run dbrev. >Check if comment was added (if you removed). >Run t/db/Koha/Database/Commenter.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_34843.pl | 18 ++++++++++++++++++ > installer/data/mysql/db_revs/210600033.pl | 4 +++- > 2 files changed, 21 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_34843.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_34843.pl b/installer/data/mysql/atomicupdate/bug_34843.pl >new file mode 100755 >index 0000000000..8ab22f127c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34843.pl >@@ -0,0 +1,18 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => 34843, >+ description => "Restore comment on article_requests.toc_request", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ $dbh->do( >+ q{ >+ ALTER TABLE article_requests MODIFY COLUMN toc_request tinyint(4) NOT NULL DEFAULT 0 >+ COMMENT 'borrower requested table of contents' >+ AFTER updated_on >+ } >+ ); >+ }, >+}; >+ >diff --git a/installer/data/mysql/db_revs/210600033.pl b/installer/data/mysql/db_revs/210600033.pl >index ec7fb05b4d..63cad460fa 100755 >--- a/installer/data/mysql/db_revs/210600033.pl >+++ b/installer/data/mysql/db_revs/210600033.pl >@@ -8,7 +8,9 @@ return { > my ($dbh, $out) = @$args{qw(dbh out)}; > if( !column_exists('article_requests', 'toc_request') ) { > $dbh->do( q| >- ALTER TABLE article_requests ADD COLUMN toc_request tinyint(4) NOT NULL DEFAULT 0 AFTER updated_on >+ ALTER TABLE article_requests ADD COLUMN toc_request tinyint(4) NOT NULL DEFAULT 0 >+ COMMENT 'borrower requested table of contents' >+ AFTER updated_on > |); > } > }, >-- >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 34843
:
156030
|
156033