Rev 677 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
DROP TABLE IF EXISTS `surveystructuralnode`;
CREATE TABLE `surveystructuralnode` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`msg` varchar(255) DEFAULT NULL,
`msgKey` varchar(255) DEFAULT NULL,
`myKey` varchar(255) DEFAULT NULL,
`parentNode` bigint(20) DEFAULT NULL,
`survey` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `msgKeyIndex` (`msgKey`),
KEY `myKeyIndex` (`myKey`),
KEY `msgIndex` (`msg`),
KEY `FK9A3D3A3991D39EEB` (`parentNode`),
KEY `FK9A3D3A39383CD3FA` (`survey`),
CONSTRAINT `FK_surveystructuralnode_1` FOREIGN KEY (`parentNode`) REFERENCES `surveystructuralnode` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `survey`;
CREATE TABLE `survey` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`updateDate` datetime NOT NULL,
`title` varchar(255) DEFAULT NULL,
`saveDate` datetime DEFAULT NULL,
`startDate` datetime DEFAULT NULL,
`endDate` datetime DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`targetRoles` varchar(255) DEFAULT NULL,
`statsConsultRoles` varchar(255) DEFAULT NULL,
`year` varchar(255) DEFAULT NULL,
`semester` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`owner` bigint(20) DEFAULT NULL,
`structuralNode` bigint(20) DEFAULT NULL,
`identifier` varchar(255) DEFAULT NULL,
`statusPercentage` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKCAE3A75AFF83C59E` (`structuralNode`),
KEY `FKCAE3A75A410CFD44` (`owner`),
KEY `FKCAE3A75A52876F6F` (`owner`),
CONSTRAINT `FKCAE3A75A410CFD44` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FKCAE3A75A52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FKCAE3A75AFF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
--
-- Table structure for table `surveyresponse`
--
DROP TABLE IF EXISTS `surveyresponse`;
CREATE TABLE `surveyresponse` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`date` datetime DEFAULT NULL,
`answered` bit(1) DEFAULT NULL,
`structuralNode` bigint(20) DEFAULT NULL,
`owner` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKE812C19BFF83C59E` (`structuralNode`),
KEY `FKE812C19B410CFD44` (`owner`),
KEY `FKE812C19B52876F6F` (`owner`),
CONSTRAINT `FKE812C19B410CFD44` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FKE812C19B52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
CONSTRAINT `FKE812C19BFF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
--
-- Table structure for table `surveyquestion`
--
DROP TABLE IF EXISTS `surveyquestion`;
CREATE TABLE `surveyquestion` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`labelpt` varchar(255) DEFAULT NULL,
`labelen` varchar(255) DEFAULT NULL,
`required` bit(1) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`survey` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKB6DDE940383CD3FA` (`survey`),
CONSTRAINT `FKB6DDE940383CD3FA` FOREIGN KEY (`survey`) REFERENCES `survey` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `surveyquestionitem`;
CREATE TABLE `surveyquestionitem` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`labelpt` varchar(255) DEFAULT NULL,
`labelen` varchar(255) DEFAULT NULL,
`question` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKD778C453EB11688C` (`question`),
CONSTRAINT `FKD778C453EB11688C` FOREIGN KEY (`question`) REFERENCES `surveyquestion` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
--
-- Table structure for table `surveyquestionanswer`
--
DROP TABLE IF EXISTS `surveyquestioncandidateanswer`;
CREATE TABLE `surveyquestioncandidateanswer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`labelpt` varchar(255) DEFAULT NULL,
`labelen` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`questionItem` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK5692D5C1BC26ACD2` (`questionItem`),
CONSTRAINT `FK5692D5C1BC26ACD2` FOREIGN KEY (`questionItem`) REFERENCES `surveyquestionitem` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `surveyquestionanswer`;
CREATE TABLE `surveyquestionanswer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`textAnswer` varchar(255) DEFAULT NULL,
`candidateAnswer` bigint(20) DEFAULT NULL,
`response` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FKCE6438FE4D7B1942` (`response`),
KEY `FKCE6438FEDB91A49C` (`candidateAnswer`),
CONSTRAINT `FKCE6438FE4D7B1942` FOREIGN KEY (`response`) REFERENCES `surveyresponse` (`id`),
CONSTRAINT `FKCE6438FEDB91A49C` FOREIGN KEY (`candidateAnswer`) REFERENCES `surveyquestioncandidateanswer` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
--
-- Table structure for table `surveyquestioncandidateanswer`
--
--
-- Table structure for table `surveyquestionitem`
--
--
-- Table structure for table `surveystatsgraphic`
--
DROP TABLE IF EXISTS `surveystatsgraphic`;
CREATE TABLE `surveystatsgraphic` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`discriminator` varchar(255) NOT NULL,
`identifier` varchar(255) DEFAULT NULL,
`question` bigint(20) DEFAULT NULL,
`structuralNode` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK47D2BDC3EB11688C` (`question`),
KEY `FK47D2BDC3FF83C59E` (`structuralNode`),
CONSTRAINT `FK47D2BDC3EB11688C` FOREIGN KEY (`question`) REFERENCES `surveyquestion` (`id`),
CONSTRAINT `FK47D2BDC3FF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
) ENGINE=Innodb DEFAULT CHARSET=latin1;
--
-- Table structure for table `surveystructuralnode`
--