add table for acknowledge workflow

This commit is contained in:
Uwe Steinmann 2015-04-20 13:46:26 +02:00
parent 387f67dad4
commit 274c020148
2 changed files with 64 additions and 0 deletions

View File

@ -382,6 +382,40 @@ CREATE TABLE `tblDocumentReviewLog` (
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentRecipients`
--
CREATE TABLE `tblDocumentRecipients` (
`receiptID` int(11) NOT NULL auto_increment,
`documentID` int(11) NOT NULL default '0',
`version` smallint(5) unsigned NOT NULL default '0',
`type` tinyint(4) NOT NULL default '0',
`required` int(11) NOT NULL default '0',
PRIMARY KEY (`receiptID`),
UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`),
CONSTRAINT `tblDocumentRecipients_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentReceiptLog`
--
CREATE TABLE `tblDocumentReceiptLog` (
`receiptLogID` int(11) NOT NULL auto_increment,
`receiptID` int(11) NOT NULL default '0',
`status` tinyint(4) NOT NULL default '0',
`comment` text NOT NULL,
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`userID` int(11) NOT NULL default '0',
PRIMARY KEY (`receiptLogID`),
CONSTRAINT `tblDocumentReceiptLog_recipient` FOREIGN KEY (`receiptID`) REFERENCES `tblDocumentRecipients` (`receiptID`) ON DELETE CASCADE,
CONSTRAINT `tblDocumentReceiptLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentStatus`
--

View File

@ -331,6 +331,36 @@ CREATE TABLE `tblDocumentReviewers` (
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentReceiptLog`
--
CREATE TABLE `tblDocumentReceiptLog` (
`receiptLogID` INTEGER PRIMARY KEY AUTOINCREMENT,
`receiptID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRecipients` (`receiptID`) ON DELETE CASCADE,
`status` INTEGER NOT NULL default 0,
`comment` TEXT NOT NULL,
`date` TEXT NOT NULL default '0000-00-00 00:00:00',
`userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
) ;
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentRecipients`
--
CREATE TABLE `tblDocumentRecipients` (
`receiptID` INTEGER PRIMARY KEY AUTOINCREMENT,
`documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
`version` INTEGER unsigned NOT NULL default '0',
`type` INTEGER NOT NULL default '0',
`required` INTEGER NOT NULL default '0',
UNIQUE (`documentID`,`version`,`type`,`required`)
) ;
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentStatus`
--