add missing ` around names

This commit is contained in:
Uwe Steinmann 2020-02-06 19:01:25 +01:00
parent 60b65aad13
commit 7f5908bcf8

View File

@ -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);