From 8a69df522d715d1e1f7b65e6549d9ffde409aaef Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 29 Jul 2013 15:06:17 +0200 Subject: [PATCH] =?utf8?q?steuerfilterung.pl:=20nicht=20manuell=20fr=C3=BC?= =?utf8?q?h=20committen,=20um=20Mehrfachausf=C3=BChrung=20zu=20erm=C3=B6gl?= =?utf8?q?ichen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Z.B. wenn der Benutzer den Zurück-Button benutzt oder so. Das Commit wird von kivitendo später eh ausgeführt, sofern das Script erfolgreich war. --- sql/Pg-upgrade2/steuerfilterung.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sql/Pg-upgrade2/steuerfilterung.pl b/sql/Pg-upgrade2/steuerfilterung.pl index 8105c32aa..f5507e0ef 100644 --- a/sql/Pg-upgrade2/steuerfilterung.pl +++ b/sql/Pg-upgrade2/steuerfilterung.pl @@ -15,6 +15,9 @@ sub run { my $categories; my $tax_id; + my $query = qq|ALTER TABLE tax ADD chart_categories TEXT|; + $self->db_query($query); + if ( $::form->{continued_tax} ) { my $update_query; foreach my $i (1 .. $::form->{rowcount}) { @@ -31,14 +34,9 @@ sub run { } $update_query = qq|ALTER TABLE tax ALTER COLUMN chart_categories SET NOT NULL|; $self->db_query($update_query); - $self->dbh->commit(); return 1; } - my $query = qq|ALTER TABLE tax ADD chart_categories TEXT|; - $self->db_query($query); - $self->dbh->commit(); - my @well_known_taxes = ( { taxkey => 0, rate => 0, taxdescription => qr{keine.*steuer}i, categories => 'ALQCIE' }, { taxkey => 1, rate => 0, taxdescription => qr{frei}i, categories => 'ALQCIE' }, -- 2.20.1