PATH:
home
/
letacommog
/
letaweb
/
protected
/
modules
/
helpSystem
/
database
/
1_DDL
/*use <<dbName>>;*/ /* create table hlp_Language*/ CREATE TABLE `hlp_Language` ( `LCID` char(5) NOT NULL, `Locale` varchar(45) NOT NULL, `LanguageCode` char(2) NOT NULL, PRIMARY KEY (`LCID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /* create table hlp_Section*/ CREATE TABLE `hlp_Section` ( `SectionId` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`SectionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /* create table hlp_sectionText*/ CREATE TABLE `hlp_SectionText` ( `SectionTextId` INT(11) NOT NULL AUTO_INCREMENT, `SectionId` INT(11) NOT NULL, `Name` VARCHAR(100) NOT NULL, `LCID` char(5) NOT NULL, PRIMARY KEY (`SectionTextId`), KEY `fk_hlp_sectionText_section_idx` (`SectionId`), KEY `fk_hlp_sectionText_language_idx` (`LCID`), CONSTRAINT `fk_hlp_sectionText_language` FOREIGN KEY (`LCID`) REFERENCES `hlp_Language` (`LCID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hlp_sectionText_section`FOREIGN KEY (`SectionId`) REFERENCES `hlp_Section` (`SectionId`)ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB DEFAULT CHARSET=utf8; /* create table hlp_Topic*/ CREATE TABLE `hlp_Topic` ( `TopicId` int(11) NOT NULL AUTO_INCREMENT, `ParentId` int(11) DEFAULT NULL, `SectionId` int(11) NOT NULL, `Order` int(11) DEFAULT '0', `Created` timestamp NOT NULL, `Modified` timestamp NOT NULL, PRIMARY KEY (`topicId`), KEY `fk_hlp_topic_section_idx` (`SectionId`), KEY `fk_hlp_topic_parent_idx` (`parentId`), CONSTRAINT `fk_hlp_topic_parent` FOREIGN KEY (`parentId`) REFERENCES `hlp_Topic` (`topicId`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hlp_topic_section` FOREIGN KEY (`SectionId`) REFERENCES `hlp_Section` (`SectionId`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /* create table hlp_topicText*/ CREATE TABLE `hlp_TopicText` ( `TopicTextId` int(11) NOT NULL AUTO_INCREMENT, `TopicId` int(11) NOT NULL, `Title` varchar(255) NOT NULL, `Body` text, `Created` timestamp NOT NULL, `Modified` timestamp NOT NULL, `LCID` char(5) NOT NULL, PRIMARY KEY (`TopicTextId`), KEY `fk_hlp_topicText_topic_idx` (`TopicId`), KEY `fk_hlp_topicText_language_idx` (`LCID`), CONSTRAINT `fk_hlp_topicText_language` FOREIGN KEY (`LCID`) REFERENCES `hlp_Language` (`LCID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_hlp_topicText_topic` FOREIGN KEY (`TopicId`) REFERENCES `hlp_Topic` (`topicId`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[+]
..
[-] 1_helpSystem_base_script.sql
[edit]