From ffb54c7e12b01c82598a724fe67579a45572327c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 13 Mar 2013 10:07:22 +0100 Subject: [PATCH] =?utf8?q?Neue=20Spalte=20numheaders=20in=20csv=5Fimport?= =?utf8?q?=5Freports=20f=C3=BCr=20Reports=20bei=20Multiplex-CSV-Daten?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Dabei auch nicht-leere Tabellen berücksichtigen. --- SL/DB/MetaSetup/CsvImportReport.pm | 1 + sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 sql/Pg-upgrade2/csv_import_reports_add_numheaders.sql 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; -- 2.20.1