3 * Schema definition - do not modify the create tables, just add alter lines
4 * The Schema parser should do the rest.
8 DROP TABLE attachments;
11 -- Table structure for table `change_audit`
13 CREATE TABLE `change_audit` (
14 `cid` int(11) NOT NULL,
15 `fieldname` varchar(128) DEFAULT NULL,
16 `action` varchar(16) DEFAULT NULL,
17 `oldvalue` varchar(128) DEFAULT NULL,
18 `value` varchar(128) DEFAULT NULL
21 -- Table structure for table `changes`
23 CREATE TABLE `changes` (
24 `cid` int(11) NOT NULL AUTO_INCREMENT,
25 `who` varchar(128) DEFAULT NULL,
26 `object` varchar(128) DEFAULT NULL,
27 `changedate` datetime NOT NULL,
28 `reason` varchar(128) DEFAULT NULL,
32 -- Table structure for table `classifications`
34 DROP TABLE classifications;
35 -- Table structure for table `clcache`
38 CREATE TABLE `clcache` (
39 `id` int(11) NOT NULL AUTO_INCREMENT,
40 `repoid` int(11) DEFAULT NULL,
41 `rev` varchar(128) DEFAULT NULL,
47 -- Table structure for table `components`
49 DROP TABLE components;
51 -- Table structure for table `components_by_project`
53 CREATE TABLE `components_by_project` (
54 `projid` int(11) NOT NULL DEFAULT '0',
55 `compid` int(11) NOT NULL,
56 PRIMARY KEY (`projid`,`compid`)
59 -- Table structure for table `effort`
62 DROP TABLE group_membership;
64 -- Table structure for table `keywords`
68 -- Table structure for table `last_notification`
70 CREATE TABLE `last_notification` (
71 `last_run` datetime NOT NULL,
72 PRIMARY KEY (`last_run`)
75 -- Table structure for table `milestones`
77 CREATE TABLE `milestones` (
78 `mid` int(11) NOT NULL AUTO_INCREMENT,
79 `name` varchar(128) DEFAULT NULL,
80 `description` varchar(128) DEFAULT NULL,
81 `startdate` datetime DEFAULT NULL,
82 `duedate` datetime DEFAULT NULL,
83 `completed` datetime DEFAULT NULL,
84 `deleted` int(11) NOT NULL DEFAULT '0',
85 `created` int(11) NOT NULL,
86 `updated` int(11) NOT NULL,
87 `pmid` int(11) DEFAULT NULL,
91 -- Table structure for table `mtrack_schema`
92 DROP TABLE mtrack_schema;
93 DROP TABLE priorities;
95 -- Table structure for table `project_repo_link`
97 CREATE TABLE `project_repo_link` (
98 `linkid` int(11) NOT NULL AUTO_INCREMENT,
99 `projid` int(11) NOT NULL,
100 `repoid` int(11) NOT NULL,
101 `repopathregex` varchar(128) DEFAULT NULL,
102 `is_scratch_space` int(11) NOT NULL DEFAULT '0',
103 PRIMARY KEY (`linkid`)
106 -- Table structure for table `projects`
109 -- Table structure for table `reports`
111 CREATE TABLE `reports` (
112 `rid` int(11) NOT NULL AUTO_INCREMENT,
113 `summary` varchar(128) NOT NULL,
114 `description` varchar(128) NOT NULL,
116 `changed` int(11) NOT NULL,
120 -- Table structure for table `repos`
122 CREATE TABLE `repos` (
123 `repoid` int(11) NOT NULL AUTO_INCREMENT,
124 `shortname` varchar(16) NOT NULL,
125 `scmtype` varchar(32) NOT NULL,
126 `repopath` varchar(128) NOT NULL,
127 `browserurl` varchar(128) DEFAULT NULL,
128 `browsertype` varchar(128) DEFAULT NULL,
129 `description` varchar(128) DEFAULT NULL,
130 `serverurl` varchar(128) DEFAULT NULL,
131 `parent` varchar(128) NOT NULL DEFAULT '',
132 `clonedfrom` int(11) DEFAULT NULL,
133 PRIMARY KEY (`repoid`)
136 -- Table structure for table `resolutions`
137 DROP TABLE resolutions;
139 -- Table structure for table `search_engine_state`
141 CREATE TABLE `search_engine_state` (
142 `last_run` datetime NOT NULL,
143 PRIMARY KEY (`last_run`)
146 -- Table structure for table `severities`
147 DROP TABLE severities;
148 -- Table structure for table `snippets`
151 CREATE TABLE `snippets` (
152 `snid` varchar(128) NOT NULL,
153 `created` int(11) NOT NULL,
154 `updated` int(11) NOT NULL,
155 `description` varchar(128) NOT NULL,
156 `lang` varchar(128) NOT NULL,
157 `snippet` varchar(128) NOT NULL,
161 -- Table structure for table `ticket_changeset_hashes`
163 CREATE TABLE `ticket_changeset_hashes` (
164 `tid` char(32) NOT NULL,
165 `hash` varchar(128) NOT NULL DEFAULT '',
166 PRIMARY KEY (`tid`,`hash`)
169 -- Table structure for table `ticket_components`
171 CREATE TABLE `ticket_components` (
172 `tid` char(32) NOT NULL,
173 `compid` int(11) NOT NULL
176 -- Table structure for table `ticket_keywords`
178 CREATE TABLE `ticket_keywords` (
179 `tid` char(32) NOT NULL,
180 `kid` int(11) NOT NULL
183 -- Table structure for table `ticket_milestones`
185 CREATE TABLE `ticket_milestones` (
186 `tid` char(32) NOT NULL,
187 `mid` int(11) NOT NULL
190 -- Table structure for table `tickets`
192 CREATE TABLE `tickets` (
193 `tid` char(32) NOT NULL,
194 `nsident` varchar(128) NOT NULL,
195 `summary` varchar(128) NOT NULL,
196 `description` varchar(128) DEFAULT NULL,
197 `changelog` varchar(128) DEFAULT NULL,
198 `created` int(11) NOT NULL,
199 `updated` int(11) NOT NULL,
200 `owner` varchar(128) DEFAULT NULL,
201 `priority` varchar(128) DEFAULT NULL,
202 `severity` varchar(128) DEFAULT NULL,
203 `classification` varchar(128) DEFAULT NULL,
204 `resolution` varchar(128) DEFAULT NULL,
205 `cc` varchar(128) DEFAULT NULL,
206 `status` varchar(128) NOT NULL,
207 `estimated` double DEFAULT NULL,
208 `spent` double DEFAULT NULL,
213 -- Table structure for table `ticketstates`
215 DROP TABLE `ticketstates` ;
217 -- Table structure for table `useraliases`
219 CREATE TABLE `useraliases` (
220 `alias` varchar(128) NOT NULL,
221 `userid` varchar(128) DEFAULT NULL,
222 PRIMARY KEY (`alias`)
225 -- Table structure for table `userinfo`
228 -- Table structure for table `watches`
230 CREATE TABLE `watches` (
231 `otype` varchar(128) NOT NULL,
232 `oid` varchar(128) NOT NULL,
233 `userid` varchar(128) NOT NULL,
234 `event` varchar(128) NOT NULL,
235 `medium` varchar(128) NOT NULL,
236 `active` int(11) NOT NULL DEFAULT '1',
237 PRIMARY KEY (`otype`,`oid`,`userid`,`event`,`medium`)