X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=sql%2FPg-upgrade2%2Fcsv_import_report_cache.sql;h=88bec343bc0edff470d705ae26cd7c52a4cb78e6;hb=94f5cb152afa9210162295b6727801c296af0631;hp=440c346108f1993fa19f8484cd03aa45355ef2e0;hpb=67643d0386e7ad051009af639cada8a5ad60d1ea;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2/csv_import_report_cache.sql b/sql/Pg-upgrade2/csv_import_report_cache.sql index 440c34610..88bec343b 100644 --- a/sql/Pg-upgrade2/csv_import_report_cache.sql +++ b/sql/Pg-upgrade2/csv_import_report_cache.sql @@ -1,14 +1,14 @@ -- @tag: csv_import_report_cache -- @description: Csv Import Cache -- @depends: csv_import_profiles_2 --- @encoding: utf-8 CREATE TABLE csv_import_reports ( id SERIAL PRIMARY KEY, session_id TEXT NOT NULL, profile_id INTEGER NOT NULL REFERENCES csv_import_profiles(id), type TEXT NOT NULL, - file TEXT NOT NULL + file TEXT NOT NULL, + numrows INTEGER NOT NULL ); CREATE TABLE csv_import_report_rows ( @@ -19,11 +19,14 @@ CREATE TABLE csv_import_report_rows ( value TEXT ); -CREATE TABLE csv_import_report_row_status ( +CREATE TABLE csv_import_report_status ( id SERIAL PRIMARY KEY, - csv_import_report_row_id INTEGER NOT NULL REFERENCES csv_import_report_rows(id), + csv_import_report_id INTEGER NOT NULL REFERENCES csv_import_reports(id), + row INTEGER NOT NULL, type TEXT NOT NULL, value TEXT ); ALTER TABLE csv_import_profiles DROP constraint "csv_import_profiles_name_key"; + +CREATE INDEX "csv_import_report_rows_index_row" ON csv_import_report_rows (row);