INSERT INTO cf_zz_Settings (name, idCategory, fieldType, label, value, options, description, required, system, sorter, added, changed) VALUES ('pathPdfExportDepartment', 1, 'text', 'PDF Export Department Path', '', '', '', 'y', 'n', 40, '2015-06-02 10:50:37.337', '2015-06-02 10:50:41.537');
INSERT INTO cf_zz_Settings (name, idCategory, fieldType, label, value, options, description, required, system, sorter, added, changed) VALUES ('pathPdfExportPart', 1, 'text', 'PDF Export Part Path', '', '', '', 'y', 'n', 30, '2015-06-02 10:27:14.913', '2015-06-02 10:27:21.397');
INSERT INTO cf_zz_Settings (name, idCategory, fieldType, label, value, options, description, required, system, sorter, added, changed) VALUES ('pathPdfExportProcess', 1, 'text', 'PDF Export Process Path', '', '', '', 'y', 'n', 50, '2015-06-02 10:52:39.977', '2015-06-02 10:52:44.037');
INSERT INTO cf_zz_Settings (name, idCategory, fieldType, label, value, options, description, required, system, sorter, added, changed) VALUES ('pathPdfExportSet', 1, 'text', 'PDF Export Set Path', '', '', '', 'y', 'n', 60, '2015-06-02 10:56:11.350', '2015-06-02 10:56:14.867');

UPDATE cf_zz_Settings SET label = 'PDF Export Default Path ("Export All Parts" functionality)' WHERE name = 'partExportPdfPath';

INSERT INTO cf_zz_SettingsOptions (name, variable, value, type) VALUES ('pathPdfExportPart', 'validators[0]', 'ExportDir', 'string');
INSERT INTO cf_zz_SettingsOptions (name, variable, value, type) VALUES ('pathPdfExportDepartment', 'validators[0]', 'ExportDir', 'string');
INSERT INTO cf_zz_SettingsOptions (name, variable, value, type) VALUES ('pathPdfExportProcess', 'validators[0]', 'ExportDir', 'string');
INSERT INTO cf_zz_SettingsOptions (name, variable, value, type) VALUES ('pathPdfExportSet', 'validators[0]', 'ExportDir', 'string');

CREATE TABLE cf_PdfExportFiles (
  id INT PRIMARY KEY NOT NULL IDENTITY,
  exportDate DATETIME NOT NULL,
  revision INT NOT NULL,
  exportedBy TEXT NOT NULL,
  pdfFile TEXT NOT NULL
);
