mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
- added new tables for attribute storage
This commit is contained in:
parent
d00110f215
commit
8295568e8b
|
@ -14,6 +14,25 @@ CREATE TABLE `tblACLs` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblAttributeDefinitions`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblAttributeDefinitions` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`name` varchar(100) default NULL,
|
||||
`objtype` tinyint(4) NOT NULL default '0',
|
||||
`type` tinyint(4) NOT NULL default '0',
|
||||
`multiple` tinyint(4) NOT NULL default '0',
|
||||
`minvalues` int(11) NOT NULL default '0',
|
||||
`maxvalues` int(11) NOT NULL default '0',
|
||||
`valueset` text default NULL,
|
||||
UNIQUE(`name`),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblUsers`
|
||||
--
|
||||
|
@ -104,6 +123,23 @@ CREATE TABLE `tblFolders` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblFolderAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblFolderAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`folder` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (folder, attrdef),
|
||||
CONSTRAINT `tblFolderAttr_folder` FOREIGN KEY (`folder`) REFERENCES `tblFolders` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblFolderAttr_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocuments`
|
||||
--
|
||||
|
@ -129,6 +165,23 @@ CREATE TABLE `tblDocuments` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblDocumentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`document` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (document, attrdef),
|
||||
CONSTRAINT `tblDocumentAttributes_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblDocumentAttributes_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentApprovers`
|
||||
--
|
||||
|
@ -169,6 +222,7 @@ CREATE TABLE `tblDocumentApproveLog` (
|
|||
--
|
||||
|
||||
CREATE TABLE `tblDocumentContent` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`document` int(11) NOT NULL default '0',
|
||||
`version` smallint(5) unsigned NOT NULL,
|
||||
`comment` text,
|
||||
|
@ -178,12 +232,30 @@ CREATE TABLE `tblDocumentContent` (
|
|||
`orgFileName` varchar(150) NOT NULL default '',
|
||||
`fileType` varchar(10) NOT NULL default '',
|
||||
`mimeType` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (`document`, `version`),
|
||||
CONSTRAINT `tblDocumentDocument_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentContentAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblDocumentContentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`content` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (content, attrdef),
|
||||
CONSTRAINT `tblDocumentContentAttributes_document` FOREIGN KEY (`content`) REFERENCES `tblDocumentContent` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblDocumentContentAttributes_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentLinks`
|
||||
--
|
||||
|
|
|
@ -14,6 +14,25 @@ CREATE TABLE `tblACLs` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblAttributeDefinitions`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblAttributeDefinitions` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`name` varchar(100) default NULL,
|
||||
`objtype` tinyint(4) NOT NULL default '0',
|
||||
`type` tinyint(4) NOT NULL default '0',
|
||||
`multiple` tinyint(4) NOT NULL default '0',
|
||||
`minvalues` int(11) NOT NULL default '0',
|
||||
`maxvalues` int(11) NOT NULL default '0',
|
||||
`valueset` text default NULL,
|
||||
UNIQUE(`name`),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblUsers`
|
||||
--
|
||||
|
@ -100,6 +119,21 @@ CREATE TABLE `tblFolders` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblFolderAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblFolderAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`folder` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
UNIQUE (folder, attrdef),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocuments`
|
||||
--
|
||||
|
@ -123,6 +157,21 @@ CREATE TABLE `tblDocuments` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblDocumentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`document` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
UNIQUE (document, attrdef),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentApprovers`
|
||||
--
|
||||
|
@ -160,6 +209,7 @@ CREATE TABLE `tblDocumentApproveLog` (
|
|||
--
|
||||
|
||||
CREATE TABLE `tblDocumentContent` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`document` int(11) NOT NULL default '0',
|
||||
`version` smallint(5) unsigned NOT NULL,
|
||||
`comment` text,
|
||||
|
@ -174,6 +224,21 @@ CREATE TABLE `tblDocumentContent` (
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentContentAttributes`
|
||||
--
|
||||
|
||||
CREATE TABLE `tblDocumentContentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`content` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (content, attrdef)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tblDocumentLinks`
|
||||
--
|
||||
|
|
|
@ -198,6 +198,12 @@
|
|||
versioningFileName = "versioning_info.txt"
|
||||
>
|
||||
</edition>
|
||||
<!-- enableNotificationAppRev: true to send notifation if a user is added as a reviewer or approver
|
||||
-->
|
||||
<notification
|
||||
enableNotificationAppRev = "true"
|
||||
>
|
||||
</notification>
|
||||
<!-- coreDir: Path to LetoDMS_Core (optional)
|
||||
- luceneClassDir: Path to LetoDMS_Lucene (optional)
|
||||
- contentOffsetDir: To work around limitations in the underlying file system, a new
|
||||
|
|
|
@ -1,3 +1,46 @@
|
|||
CREATE TABLE `tblAttributeDefinitions` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`name` varchar(100) default NULL,
|
||||
`objtype` tinyint(4) NOT NULL default '0',
|
||||
`type` tinyint(4) NOT NULL default '0',
|
||||
`multiple` tinyint(4) NOT NULL default '0',
|
||||
`minvalues` int(11) NOT NULL default '0',
|
||||
`maxvalues` int(11) NOT NULL default '0',
|
||||
`valueset` text default NULL,
|
||||
UNIQUE(`name`),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tblFolderAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`folder` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (folder, attrdef),
|
||||
CONSTRAINT `tblFolderAttr_folder` FOREIGN KEY (`folder`) REFERENCES `tblFolders` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblFolderAttr_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tblDocumentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`document` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (document, attrdef),
|
||||
CONSTRAINT `tblDocumentAttributes_document` FOREIGN KEY (`document`) REFERENCES `tblDocuments` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblDocumentAttributes_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE tblDocumentContent ADD COLUMN `id` int(11) NOT NULL auto_increment PRIMARY KEY FIRST;
|
||||
CREATE TABLE `tblDocumentContentAttributes` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`content` int(11) default NULL,
|
||||
`attrdef` int(11) default NULL,
|
||||
`value` text default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (content, attrdef),
|
||||
CONSTRAINT `tblDocumentContentAttributes_document` FOREIGN KEY (`content`) REFERENCES `tblDocumentContent` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `tblDocumentContentAttributes_attrdef` FOREIGN KEY (`attrdef`) REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `tblUserPasswordHistory` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
`userID` int(11) NOT NULL default '0',
|
||||
|
@ -5,7 +48,7 @@ CREATE TABLE `tblUserPasswordHistory` (
|
|||
`date` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `tblUserPasswordHistory_user` FOREIGN KEY (`userID`) REFERENCES `tblUsers` (`id`) ON DELETE CASCADE
|
||||
) DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE tblUsers ADD COLUMN `pwdExpiration` datetime NOT NULL default '0000-00-00 00:00:00';
|
||||
ALTER TABLE tblUsers ADD COLUMN `loginfailures` tinyint(4) NOT NULL default '0';
|
||||
ALTER TABLE tblUsers ADD COLUMN `disabled` smallint(4) NOT NULL default '0';
|
||||
|
|
Loading…
Reference in New Issue
Block a user