Subversion Repositories bacoAlunos

Rev

Rev 1306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
676 jmachado 1
 
677 jmachado 2
DROP TABLE IF EXISTS `surveystructuralnode`;
3
CREATE TABLE `surveystructuralnode` (
4
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
5
  `discriminator` varchar(255) NOT NULL,
6
  `msg` varchar(255) DEFAULT NULL,
7
  `msgKey` varchar(255) DEFAULT NULL,
8
  `myKey` varchar(255) DEFAULT NULL,
9
  `parentNode` bigint(20) DEFAULT NULL,
10
  `survey` bigint(20) DEFAULT NULL,
11
  PRIMARY KEY  (`id`),
12
  KEY `msgKeyIndex` (`msgKey`),
13
  KEY `myKeyIndex` (`myKey`),
14
  KEY `msgIndex` (`msg`),
15
  KEY `FK9A3D3A3991D39EEB` (`parentNode`),
16
  KEY `FK9A3D3A39383CD3FA` (`survey`),
17
  CONSTRAINT `FK_surveystructuralnode_1` FOREIGN KEY (`parentNode`) REFERENCES `surveystructuralnode` (`id`)
18
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 19
 
20
DROP TABLE IF EXISTS `survey`;
21
CREATE TABLE `survey` (
22
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
23
  `discriminator` varchar(255) NOT NULL,
24
  `updateDate` datetime NOT NULL,
25
  `title` varchar(255) DEFAULT NULL,
26
  `saveDate` datetime DEFAULT NULL,
27
  `startDate` datetime DEFAULT NULL,
28
  `endDate` datetime DEFAULT NULL,
29
  `type` varchar(255) DEFAULT NULL,
30
  `targetRoles` varchar(255) DEFAULT NULL,
31
  `statsConsultRoles` varchar(255) DEFAULT NULL,
32
  `year` varchar(255) DEFAULT NULL,
33
  `semester` varchar(255) DEFAULT NULL,
34
  `status` varchar(255) DEFAULT NULL,
35
  `owner` bigint(20) DEFAULT NULL,
36
  `structuralNode` bigint(20) DEFAULT NULL,
37
  `identifier` varchar(255) DEFAULT NULL,
38
  `statusPercentage` int(11) DEFAULT NULL,
39
  PRIMARY KEY  (`id`),
40
  KEY `FKCAE3A75AFF83C59E` (`structuralNode`),
41
  KEY `FKCAE3A75A410CFD44` (`owner`),
42
  KEY `FKCAE3A75A52876F6F` (`owner`),
43
  CONSTRAINT `FKCAE3A75A410CFD44` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
44
  CONSTRAINT `FKCAE3A75A52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
45
  CONSTRAINT `FKCAE3A75AFF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
677 jmachado 46
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 47
 
677 jmachado 48
 
676 jmachado 49
--
677 jmachado 50
-- Table structure for table `surveyresponse`
51
--
52
 
53
DROP TABLE IF EXISTS `surveyresponse`;
54
CREATE TABLE `surveyresponse` (
55
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
56
  `discriminator` varchar(255) NOT NULL,
57
  `date` datetime DEFAULT NULL,
58
  `answered` bit(1) DEFAULT NULL,
59
  `structuralNode` bigint(20) DEFAULT NULL,
60
  `owner` bigint(20) DEFAULT NULL,
61
  PRIMARY KEY  (`id`),
62
  KEY `FKE812C19BFF83C59E` (`structuralNode`),
63
  KEY `FKE812C19B410CFD44` (`owner`),
64
  KEY `FKE812C19B52876F6F` (`owner`),
65
  CONSTRAINT `FKE812C19B410CFD44` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
66
  CONSTRAINT `FKE812C19B52876F6F` FOREIGN KEY (`owner`) REFERENCES `user` (`id`),
67
  CONSTRAINT `FKE812C19BFF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
68
) ENGINE=Innodb DEFAULT CHARSET=latin1;
69
 
70
 
71
--
676 jmachado 72
-- Table structure for table `surveyquestion`
73
--
74
 
75
DROP TABLE IF EXISTS `surveyquestion`;
76
CREATE TABLE `surveyquestion` (
77
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
78
  `discriminator` varchar(255) NOT NULL,
79
  `labelpt` varchar(255) DEFAULT NULL,
80
  `labelen` varchar(255) DEFAULT NULL,
81
  `required` bit(1) DEFAULT NULL,
82
  `type` varchar(255) DEFAULT NULL,
83
  `survey` bigint(20) DEFAULT NULL,
84
  PRIMARY KEY  (`id`),
85
  KEY `FKB6DDE940383CD3FA` (`survey`),
86
  CONSTRAINT `FKB6DDE940383CD3FA` FOREIGN KEY (`survey`) REFERENCES `survey` (`id`)
677 jmachado 87
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 88
 
89
 
677 jmachado 90
 
91
DROP TABLE IF EXISTS `surveyquestionitem`;
92
CREATE TABLE `surveyquestionitem` (
676 jmachado 93
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
94
  `discriminator` varchar(255) NOT NULL,
677 jmachado 95
  `labelpt` varchar(255) DEFAULT NULL,
96
  `labelen` varchar(255) DEFAULT NULL,
97
  `question` bigint(20) DEFAULT NULL,
676 jmachado 98
  PRIMARY KEY  (`id`),
677 jmachado 99
  KEY `FKD778C453EB11688C` (`question`),
100
  CONSTRAINT `FKD778C453EB11688C` FOREIGN KEY (`question`) REFERENCES `surveyquestion` (`id`)
101
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 102
 
677 jmachado 103
 
676 jmachado 104
--
677 jmachado 105
-- Table structure for table `surveyquestionanswer`
676 jmachado 106
--
107
 
108
DROP TABLE IF EXISTS `surveyquestioncandidateanswer`;
109
CREATE TABLE `surveyquestioncandidateanswer` (
110
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
111
  `discriminator` varchar(255) NOT NULL,
112
  `labelpt` varchar(255) DEFAULT NULL,
113
  `labelen` varchar(255) DEFAULT NULL,
114
  `type` varchar(255) DEFAULT NULL,
115
  `questionItem` bigint(20) DEFAULT NULL,
116
  PRIMARY KEY  (`id`),
117
  KEY `FK5692D5C1BC26ACD2` (`questionItem`),
118
  CONSTRAINT `FK5692D5C1BC26ACD2` FOREIGN KEY (`questionItem`) REFERENCES `surveyquestionitem` (`id`)
677 jmachado 119
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 120
 
677 jmachado 121
DROP TABLE IF EXISTS `surveyquestionanswer`;
122
CREATE TABLE `surveyquestionanswer` (
676 jmachado 123
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
124
  `discriminator` varchar(255) NOT NULL,
677 jmachado 125
  `textAnswer` varchar(255) DEFAULT NULL,
126
  `candidateAnswer` bigint(20) DEFAULT NULL,
127
  `response` bigint(20) DEFAULT NULL,
676 jmachado 128
  PRIMARY KEY  (`id`),
677 jmachado 129
  KEY `FKCE6438FE4D7B1942` (`response`),
130
  KEY `FKCE6438FEDB91A49C` (`candidateAnswer`),
131
  CONSTRAINT `FKCE6438FE4D7B1942` FOREIGN KEY (`response`) REFERENCES `surveyresponse` (`id`),
132
  CONSTRAINT `FKCE6438FEDB91A49C` FOREIGN KEY (`candidateAnswer`) REFERENCES `surveyquestioncandidateanswer` (`id`)
133
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 134
 
135
--
677 jmachado 136
-- Table structure for table `surveyquestioncandidateanswer`
676 jmachado 137
--
138
 
139
 
140
--
677 jmachado 141
-- Table structure for table `surveyquestionitem`
142
--
143
 
144
 
145
--
676 jmachado 146
-- Table structure for table `surveystatsgraphic`
147
--
148
 
149
DROP TABLE IF EXISTS `surveystatsgraphic`;
150
CREATE TABLE `surveystatsgraphic` (
151
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
152
  `discriminator` varchar(255) NOT NULL,
153
  `identifier` varchar(255) DEFAULT NULL,
154
  `question` bigint(20) DEFAULT NULL,
155
  `structuralNode` bigint(20) DEFAULT NULL,
156
  PRIMARY KEY  (`id`),
157
  KEY `FK47D2BDC3EB11688C` (`question`),
158
  KEY `FK47D2BDC3FF83C59E` (`structuralNode`),
159
  CONSTRAINT `FK47D2BDC3EB11688C` FOREIGN KEY (`question`) REFERENCES `surveyquestion` (`id`),
160
  CONSTRAINT `FK47D2BDC3FF83C59E` FOREIGN KEY (`structuralNode`) REFERENCES `surveystructuralnode` (`id`)
677 jmachado 161
) ENGINE=Innodb DEFAULT CHARSET=latin1;
676 jmachado 162
 
163
--
164
-- Table structure for table `surveystructuralnode`
165
--
166
 
677 jmachado 167