From: Bernd Bleßmann Date: Wed, 13 Mar 2013 09:07:22 +0000 (+0100) Subject: Neue Spalte numheaders in csv_import_reports für Reports bei Multiplex-CSV-Daten X-Git-Tag: release-3.1.0beta1~22^2~154 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ffb54c7e12b01c82598a724fe67579a45572327c;p=kivitendo-erp.git Neue Spalte numheaders in csv_import_reports für Reports bei Multiplex-CSV-Daten Dabei auch nicht-leere Tabellen berücksichtigen. --- diff --git a/SL/DB/MetaSetup/CsvImportReport.pm b/SL/DB/MetaSetup/CsvImportReport.pm index 9b2fc3972..3a8433c51 100644 --- a/SL/DB/MetaSetup/CsvImportReport.pm +++ b/SL/DB/MetaSetup/CsvImportReport.pm @@ -11,6 +11,7 @@ __PACKAGE__->meta->table('csv_import_reports'); __PACKAGE__->meta->columns( file => { type => 'text', not_null => 1 }, id => { type => 'serial', not_null => 1 }, + numheaders => { type => 'integer', not_null => 1 }, numrows => { type => 'integer', not_null => 1 }, profile_id => { type => 'integer', not_null => 1 }, session_id => { type => 'text', not_null => 1 }, diff --git a/sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql b/sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql new file mode 100644 index 000000000..b68b668b0 --- /dev/null +++ b/sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql @@ -0,0 +1,8 @@ +-- @tag: csv_import_reports_add_numheaders +-- @description: Anzahl der Header-Zeilen in Csv Import Report speichern +-- @depends: csv_import_report_cache +-- @encoding: utf-8 + +ALTER TABLE csv_import_reports ADD COLUMN numheaders INTEGER; +UPDATE csv_import_reports SET numheaders = 1; +ALTER TABLE csv_import_reports ALTER COLUMN numheaders SET NOT NULL;