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> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
6a706f0e6a
commit
d7e5fb0344
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue