From 7f5908bcf83e1b62e09769ca974c2c27df5ef5a6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 Feb 2020 19:01:25 +0100 Subject: [PATCH] add missing ` around names --- install/create_tables-sqlite3.sql | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install/create_tables-sqlite3.sql b/install/create_tables-sqlite3.sql index 2eff9a797..42be5dcee 100644 --- a/install/create_tables-sqlite3.sql +++ b/install/create_tables-sqlite3.sql @@ -163,7 +163,7 @@ CREATE TABLE `tblFolderAttributes` ( `folder` INTEGER default NULL REFERENCES `tblFolders` (`id`) ON DELETE CASCADE, `attrdef` INTEGER default NULL REFERENCES `tblAttributeDefinitions` (`id`), `value` text default NULL, - UNIQUE (folder, attrdef) + UNIQUE (`folder`, `attrdef`) ) ; -- -------------------------------------------------------- @@ -199,7 +199,7 @@ CREATE TABLE `tblDocumentAttributes` ( `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `attrdef` INTEGER default NULL REFERENCES `tblAttributeDefinitions` (`id`), `value` text default NULL, - UNIQUE (document, attrdef) + UNIQUE (`document`, `attrdef`) ) ; -- -------------------------------------------------------- @@ -268,7 +268,7 @@ CREATE TABLE `tblDocumentContentAttributes` ( `content` INTEGER default NULL REFERENCES `tblDocumentContent` (`id`) ON DELETE CASCADE, `attrdef` INTEGER default NULL REFERENCES `tblAttributeDefinitions` (`id`), `value` text default NULL, - UNIQUE (content, attrdef) + UNIQUE (`content`, `attrdef`) ) ; -- -------------------------------------------------------- @@ -710,7 +710,7 @@ CREATE TABLE `tblWorkflowLog` ( CREATE TABLE `tblWorkflowMandatoryWorkflow` ( `userid` INTEGER default NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE, `workflow` INTEGER default NULL REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE, - UNIQUE(userid, workflow) + UNIQUE(`userid`, `workflow`) ) ; -- -------------------------------------------------------- @@ -719,7 +719,7 @@ CREATE TABLE `tblWorkflowMandatoryWorkflow` ( -- Table structure for transmittal -- -CREATE TABLE tblTransmittals ( +CREATE TABLE `tblTransmittals` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` text NOT NULL, `comment` text NOT NULL, @@ -740,7 +740,7 @@ CREATE TABLE `tblTransmittalItems` ( `document` INTEGER default NULL REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE, `version` INTEGER unsigned NOT NULL default '0', `date` TEXT default NULL, - UNIQUE (transmittal, document, version) + UNIQUE (`transmittal`, `document`, `version`) ); -- -------------------------------------------------------- @@ -786,7 +786,7 @@ CREATE TABLE `tblArosAcos` ( `read` INTEGER NOT NULL DEFAULT '-1', `update` INTEGER NOT NULL DEFAULT '-1', `delete` INTEGER NOT NULL DEFAULT '-1', - UNIQUE (aco, aro) + UNIQUE (`aco`, `aro`) ) ; -- -------------------------------------------------------- @@ -830,7 +830,7 @@ CREATE TABLE `tblVersion` ( INSERT INTO `tblRoles` (`id`, `name`, `role`) VALUES (1, 'Admin', 1); INSERT INTO `tblRoles` (`id`, `name`, `role`) VALUES (2, 'Guest', 2); INSERT INTO `tblRoles` (`id`, `name`, `role`) VALUES (3, 'User', 0); -INSERT INTO tblUsers VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '', 'Administrator', 'address@server.com', '', '', '', 1, 0, '', 0, 0, 0, 0); -INSERT INTO tblUsers VALUES (2, 'guest', NULL, '', 'Guest User', NULL, '', '', '', 2, 0, '', 0, 0, 0, 0); -INSERT INTO tblFolders VALUES (1, 'DMS', 0, '', 'DMS root', strftime('%s','now'), 1, 0, 2, 0); -INSERT INTO tblVersion VALUES (DATETIME(), 6, 0, 0); +INSERT INTO `tblUsers` VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '', 'Administrator', 'address@server.com', '', '', '', 1, 0, '', 0, 0, 0, 0); +INSERT INTO `tblUsers` VALUES (2, 'guest', NULL, '', 'Guest User', NULL, '', '', '', 2, 0, '', 0, 0, 0, 0); +INSERT INTO `tblFolders` VALUES (1, 'DMS', 0, '', 'DMS root', strftime('%s','now'), 1, 0, 2, 0); +INSERT INTO `tblVersion` VALUES (DATETIME(), 6, 0, 0);