Bugzilla – Attachment 149268 Details for
Bug 32334
Sync comments in database with schema
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32334: (follow-up) Fix for bug 31028, introducing IF NOT EXISTS
Bug-32334-follow-up-Fix-for-bug-31028-introducing-.patch (text/plain), 1.43 KB, created by
Jonathan Druart
on 2023-04-07 11:49:26 UTC
(
hide
)
Description:
Bug 32334: (follow-up) Fix for bug 31028, introducing IF NOT EXISTS
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-07 11:49:26 UTC
Size:
1.43 KB
patch
obsolete
>From 3902c237e1aa3ba03ffd2fbd15320af75790b509 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 16 Mar 2023 12:57:13 +0000 >Subject: [PATCH] Bug 32334: (follow-up) Fix for bug 31028, introducing IF NOT > EXISTS > >We need to expect CREATE TABLE IF NOT EXISTS now in kohastructure. > >Test plan: >Run misc/maintenance/sync_db_comments.pl -reset > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Database/Commenter.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Database/Commenter.pm b/Koha/Database/Commenter.pm >index 9ce562ff947..2b37067c76a 100644 >--- a/Koha/Database/Commenter.pm >+++ b/Koha/Database/Commenter.pm >@@ -182,9 +182,9 @@ sub _fetch_schema_comments { > my $info = {}; > my $current_table = q{}; > foreach my $line ( @schema_lines ) { >- if( $line =~ /^CREATE TABLE `?(\w+)`?/ ) { >+ if( $line =~ /^CREATE TABLE\s*(?:IF NOT EXISTS)?\s*`?(\w+)`?/ ) { > $current_table = $1; >- } elsif( $line =~ /^\s+`?(\w+)`?.*COMMENT ['"](.+)['"][,)]?$/ ) { >+ } elsif( $current_table && $line =~ /^\s+`?(\w+)`?.*COMMENT ['"](.+)['"][,)]?$/ ) { > my ( $col, $comment ) = ( $1, $2 ); > $comment =~ s/''/'/g; # we call quote later on > $info->{$current_table}->{$col} = $comment; >-- >2.25.1
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 32334
:
144391
|
144392
|
144393
|
144394
|
146712
|
146713
|
146714
|
146715
|
146716
|
146717
|
146718
|
146719
|
146720
|
148266
|
148299
|
148335
|
148338
|
148339
|
148340
|
148341
|
148342
|
148343
|
148344
|
148345
|
148346
|
148347
|
148348
|
149259
|
149260
|
149261
|
149262
|
149263
|
149264
|
149265
|
149266
|
149267
| 149268 |
149269
|
149270