From 6234a9ff5fa91b0c495f577b175ee169895d4674 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 20 Apr 2023 12:58:46 +0000 Subject: [PATCH] Bug 24975: (follow-up) Fix dbrev Content-Type: text/plain; charset=utf-8 --- .../{bug-24975.perl => bug24975.pl} | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) rename installer/data/mysql/atomicupdate/{bug-24975.perl => bug24975.pl} (87%) diff --git a/installer/data/mysql/atomicupdate/bug-24975.perl b/installer/data/mysql/atomicupdate/bug24975.pl similarity index 87% rename from installer/data/mysql/atomicupdate/bug-24975.perl rename to installer/data/mysql/atomicupdate/bug24975.pl index 011fe02361..f57e5b5585 100644 --- a/installer/data/mysql/atomicupdate/bug-24975.perl +++ b/installer/data/mysql/atomicupdate/bug24975.pl @@ -1,5 +1,17 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { +use Modern::Perl; + +return { + bug_number => 24975, + description => "Refactor database translations", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + dbrev($dbh); + }, +}; + +sub dbrev { + my $dbh = shift; $dbh->do(q{ CREATE TABLE IF NOT EXISTS l10n_source ( `l10n_source_id` INT(11) NOT NULL AUTO_INCREMENT, @@ -43,8 +55,4 @@ if( CheckVersion( $DBversion ) ) { #$dbh->do('DROP TABLE localization'); } - - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24975 - l10n_source, l10n_target)\n"; } -- 2.30.2