mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-19 08:01:39 +00:00
place tblWorkflowLog after tblWorkflowDocumentContent
This commit is contained in:
parent
4e0a34966c
commit
39a7c26977
|
@ -805,6 +805,30 @@ CREATE TABLE `tblWorkflowTransitionGroups` (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `tblWorkflowDocumentContent`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `tblWorkflowDocumentContent` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`parent` int(11) DEFAULT NULL,
|
||||||
|
`workflow` int(11) DEFAULT NULL,
|
||||||
|
`document` int(11) DEFAULT NULL,
|
||||||
|
`version` smallint(5) DEFAULT NULL,
|
||||||
|
`state` int(11) DEFAULT NULL,
|
||||||
|
`date` datetime NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `tblWorkflowDocument_document` (`document`),
|
||||||
|
KEY `tblWorkflowDocument_workflow` (`workflow`),
|
||||||
|
KEY `tblWorkflowDocument_state` (`state`),
|
||||||
|
CONSTRAINT `tblWorkflowDocument_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
|
||||||
|
CONSTRAINT `tblWorkflowDocument_state` FOREIGN KEY (`state`) REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE,
|
||||||
|
CONSTRAINT `tblWorkflowDocumentContent_parent` FOREIGN KEY (`parent`) REFERENCES `tblWorkflowDocumentContent` (`id`) ON DELETE CASCADE,
|
||||||
|
CONSTRAINT `tblWorkflowDocument_workflow` FOREIGN KEY (`workflow`) REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `tblWorkflowLog`
|
-- Table structure for table `tblWorkflowLog`
|
||||||
--
|
--
|
||||||
|
@ -827,29 +851,6 @@ CREATE TABLE `tblWorkflowLog` (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `tblWorkflowDocumentContent`
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE `tblWorkflowDocumentContent` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`parent` int(11) DEFAULT NULL,
|
|
||||||
`workflow` int(11) DEFAULT NULL,
|
|
||||||
`document` int(11) DEFAULT NULL,
|
|
||||||
`version` smallint(5) DEFAULT NULL,
|
|
||||||
`state` int(11) DEFAULT NULL,
|
|
||||||
`date` datetime NOT NULL,
|
|
||||||
KEY `tblWorkflowDocument_document` (`document`),
|
|
||||||
KEY `tblWorkflowDocument_workflow` (`workflow`),
|
|
||||||
KEY `tblWorkflowDocument_state` (`state`),
|
|
||||||
CONSTRAINT `tblWorkflowDocument_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
|
|
||||||
CONSTRAINT `tblWorkflowDocument_state` FOREIGN KEY (`state`) REFERENCES `tblWorkflowStates` (`id`) ON DELETE CASCADE,
|
|
||||||
CONSTRAINT `tblWorkflowDocumentContent_parent` FOREIGN KEY (`parent`) REFERENCES `tblWorkflowDocumentContent` (`id`) ON DELETE CASCADE,
|
|
||||||
CONSTRAINT `tblWorkflowDocument_workflow` FOREIGN KEY (`workflow`) REFERENCES `tblWorkflows` (`id`) ON DELETE CASCADE
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `tblWorkflowMandatoryWorkflow`
|
-- Table structure for table `tblWorkflowMandatoryWorkflow`
|
||||||
--
|
--
|
||||||
|
|
|
@ -663,21 +663,6 @@ CREATE TABLE "tblWorkflowTransitionGroups" (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for workflow log
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE "tblWorkflowLog" (
|
|
||||||
"id" SERIAL UNIQUE,
|
|
||||||
"workflowdocumentcontent" INTEGER DEFAULT NULL REFERENCES "tblWorkflowDocumentContent" ("id") ON DELETE CASCADE,
|
|
||||||
"userid" INTEGER default NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE,
|
|
||||||
"transition" INTEGER default NULL REFERENCES "tblWorkflowTransitions" ("id") ON DELETE CASCADE,
|
|
||||||
"date" TIMESTAMP default NULL,
|
|
||||||
"comment" text
|
|
||||||
) ;
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for workflow document relation
|
-- Table structure for workflow document relation
|
||||||
--
|
--
|
||||||
|
@ -694,6 +679,21 @@ CREATE TABLE "tblWorkflowDocumentContent" (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for workflow log
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE "tblWorkflowLog" (
|
||||||
|
"id" SERIAL UNIQUE,
|
||||||
|
"workflowdocumentcontent" INTEGER DEFAULT NULL REFERENCES "tblWorkflowDocumentContent" ("id") ON DELETE CASCADE,
|
||||||
|
"userid" INTEGER default NULL REFERENCES "tblUsers" ("id") ON DELETE CASCADE,
|
||||||
|
"transition" INTEGER default NULL REFERENCES "tblWorkflowTransitions" ("id") ON DELETE CASCADE,
|
||||||
|
"date" TIMESTAMP default NULL,
|
||||||
|
"comment" text
|
||||||
|
) ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for mandatory workflows
|
-- Table structure for mandatory workflows
|
||||||
--
|
--
|
||||||
|
|
|
@ -672,21 +672,6 @@ CREATE TABLE `tblWorkflowTransitionGroups` (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `tblWorkflowLog`
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE TABLE `tblWorkflowLog` (
|
|
||||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
||||||
`workflowdocumentcontent` INTEGER DEFAULT NULL REFERENCES `tblWorkflowDocumentContent` (`id`) ON DELETE CASCADE,
|
|
||||||
`userid` INTEGER default NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE,
|
|
||||||
`transition` INTEGER default NULL REFERENCES `tblWorkflowTransitions` (`id`) ON DELETE CASCADE,
|
|
||||||
`date` datetime NOT NULL,
|
|
||||||
`comment` text
|
|
||||||
) ;
|
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `tblWorkflowDocumentContent`
|
-- Table structure for table `tblWorkflowDocumentContent`
|
||||||
--
|
--
|
||||||
|
@ -704,6 +689,21 @@ CREATE TABLE `tblWorkflowDocumentContent` (
|
||||||
|
|
||||||
-- --------------------------------------------------------
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `tblWorkflowLog`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `tblWorkflowLog` (
|
||||||
|
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
`workflowdocumentcontent` INTEGER DEFAULT NULL REFERENCES `tblWorkflowDocumentContent` (`id`) ON DELETE CASCADE,
|
||||||
|
`userid` INTEGER default NULL REFERENCES `tblUsers` (`id`) ON DELETE CASCADE,
|
||||||
|
`transition` INTEGER default NULL REFERENCES `tblWorkflowTransitions` (`id`) ON DELETE CASCADE,
|
||||||
|
`date` datetime NOT NULL,
|
||||||
|
`comment` text
|
||||||
|
) ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `tblWorkflowMandatoryWorkflow`
|
-- Table structure for table `tblWorkflowMandatoryWorkflow`
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in New Issue
Block a user