rename tblDocumentRevisers to tblDocumentRevisors

This commit is contained in:
Uwe Steinmann 2015-05-11 09:28:31 +02:00
parent cf2160993f
commit 9955a0e07b
2 changed files with 9 additions and 7 deletions

View File

@ -250,6 +250,7 @@ CREATE TABLE `tblDocumentContent` (
`mimeType` varchar(100) NOT NULL default '',
`fileSize` BIGINT,
`checksum` char(32),
`revsiondate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE (`document`, `version`),
CONSTRAINT `tblDocumentContent_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`)
@ -418,10 +419,10 @@ CREATE TABLE `tblDocumentReceiptLog` (
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentRevisers`
-- Table structure for table `tblDocumentRevisors`
--
CREATE TABLE `tblDocumentRevisers` (
CREATE TABLE `tblDocumentRevisors` (
`revisionID` int(11) NOT NULL auto_increment,
`documentID` int(11) NOT NULL default '0',
`version` smallint(5) unsigned NOT NULL default '0',
@ -430,7 +431,7 @@ CREATE TABLE `tblDocumentRevisers` (
`startdate` datetime default NULL,
PRIMARY KEY (`revisionID`),
UNIQUE KEY `documentID` (`documentID`,`version`,`type`,`required`),
CONSTRAINT `tblDocumentRevisers_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE
CONSTRAINT `tblDocumentRevisors_document` FOREIGN KEY (`documentID`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@ -447,7 +448,7 @@ CREATE TABLE `tblDocumentRevisionLog` (
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`userID` int(11) NOT NULL default '0',
PRIMARY KEY (`revisionLogID`),
CONSTRAINT `tblDocumentRevisionLog_revision` FOREIGN KEY (`revisionID`) REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE,
CONSTRAINT `tblDocumentRevisionLog_revision` FOREIGN KEY (`revisionID`) REFERENCES `tblDocumentRevisors` (`revisionID`) ON DELETE CASCADE,
CONSTRAINT `tblDocumentRevisionLog_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -223,6 +223,7 @@ CREATE TABLE `tblDocumentContent` (
`mimeType` varchar(70) NOT NULL default '',
`fileSize` INTEGER,
`checksum` char(32),
`revsiondate` INTEGER default NULL,
UNIQUE (`document`,`version`)
) ;
@ -367,7 +368,7 @@ CREATE TABLE `tblDocumentRecipients` (
CREATE TABLE `tblDocumentRevisionLog` (
`revisionLogID` INTEGER PRIMARY KEY AUTOINCREMENT,
`revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisers` (`revisionID`) ON DELETE CASCADE,
`revisionID` INTEGER NOT NULL default 0 REFERENCES `tblDocumentRevisors` (`revisionID`) ON DELETE CASCADE,
`status` INTEGER NOT NULL default 0,
`comment` TEXT NOT NULL,
`date` TEXT NOT NULL default '0000-00-00 00:00:00',
@ -377,10 +378,10 @@ CREATE TABLE `tblDocumentRevisionLog` (
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentRevisers`
-- Table structure for table `tblDocumentRevisors`
--
CREATE TABLE `tblDocumentRevisers` (
CREATE TABLE `tblDocumentRevisors` (
`revisionID` INTEGER PRIMARY KEY AUTOINCREMENT,
`documentID` INTEGER NOT NULL default '0' REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
`version` INTEGER unsigned NOT NULL default '0',