]> git.ipfire.org Git - people/jschlag/pbs.git/blame - data/schema.sql
Alter search so that no FULLTEXT index is required.
[people/jschlag/pbs.git] / data / schema.sql
CommitLineData
9050c160
MT
1-- phpMyAdmin SQL Dump
2-- version 3.5.4
3-- http://www.phpmyadmin.net
4--
5-- Host: localhost
6-- Generation Time: Dec 12, 2012 at 05:25 PM
7-- Server version: 5.1.61-log
8-- PHP Version: 5.3.3
9
10SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8 */;
18
19--
20-- Database: `pakfire`
21--
22
23-- --------------------------------------------------------
24
25--
26-- Table structure for table `arches`
27--
28
29CREATE TABLE IF NOT EXISTS `arches` (
30 `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
31 `name` varchar(32) NOT NULL,
32 `prio` int(11) NOT NULL DEFAULT '0',
33 `binary` enum('Y','N') NOT NULL DEFAULT 'Y',
34 PRIMARY KEY (`id`)
35) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
36
37-- --------------------------------------------------------
38
39--
40-- Table structure for table `builders`
41--
42
43CREATE TABLE IF NOT EXISTS `builders` (
44 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
45 `name` varchar(255) NOT NULL,
46 `passphrase` varchar(255) DEFAULT NULL,
47 `description` text,
48 `status` enum('enabled','disabled','deleted') NOT NULL DEFAULT 'disabled',
49 `disabled` enum('Y','N') NOT NULL DEFAULT 'Y',
50 `loadavg` varchar(32) NOT NULL DEFAULT '0',
51 `arches` varchar(128) DEFAULT NULL,
52 `build_release` enum('Y','N') NOT NULL DEFAULT 'N',
53 `build_scratch` enum('Y','N') NOT NULL DEFAULT 'N',
54 `build_test` enum('Y','N') NOT NULL DEFAULT 'N',
55 `max_jobs` int(11) NOT NULL DEFAULT '1',
56 `pakfire_version` varchar(32) DEFAULT NULL,
57 `cpu_model` varchar(255) DEFAULT NULL,
58 `cpu_count` tinyint(4) NOT NULL DEFAULT '1',
59 `memory` bigint(20) unsigned NOT NULL DEFAULT '0',
60 `overload` enum('Y','N') NOT NULL DEFAULT 'N',
61 `free_space` int(11) NOT NULL DEFAULT '0',
62 `host_key_id` varchar(64) DEFAULT NULL,
63 `deleted` enum('Y','N') NOT NULL DEFAULT 'N',
64 `time_created` datetime NOT NULL,
65 `time_updated` datetime DEFAULT NULL,
66 `time_keepalive` datetime DEFAULT NULL,
67 PRIMARY KEY (`id`)
68) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=25 ;
69
70-- --------------------------------------------------------
71
72--
73-- Table structure for table `builders_arches`
74--
75
76CREATE TABLE IF NOT EXISTS `builders_arches` (
77 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
78 `builder_id` int(11) unsigned NOT NULL,
79 `arch_id` int(11) unsigned NOT NULL,
80 `enabled` enum('Y','N') NOT NULL DEFAULT 'Y',
81 PRIMARY KEY (`id`)
82) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=81 ;
83
84-- --------------------------------------------------------
85
86--
87-- Table structure for table `builders_history`
88--
89
90CREATE TABLE IF NOT EXISTS `builders_history` (
91 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
92 `builder_id` int(10) unsigned NOT NULL,
93 `action` enum('created','enabled','disabled','deleted') NOT NULL,
94 `user_id` int(10) unsigned DEFAULT NULL,
95 `time` datetime NOT NULL,
96 PRIMARY KEY (`id`)
97) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=91 ;
98
99-- --------------------------------------------------------
100
101--
102-- Table structure for table `builds`
103--
104
105CREATE TABLE IF NOT EXISTS `builds` (
106 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
107 `uuid` varchar(40) NOT NULL,
108 `pkg_id` int(11) unsigned NOT NULL,
109 `type` enum('release','scratch') NOT NULL DEFAULT 'release',
110 `state` enum('building','testing','stable','obsolete','broken') NOT NULL DEFAULT 'building',
111 `severity` enum('security update','bugfix update','enhancement','new package') DEFAULT NULL,
112 `message` text,
113 `time_created` datetime NOT NULL,
114 `update_year` int(11) DEFAULT NULL,
115 `update_num` int(11) DEFAULT NULL,
116 `depends_on` int(11) unsigned DEFAULT NULL,
117 `distro_id` int(11) NOT NULL,
118 `owner_id` int(11) unsigned DEFAULT NULL,
119 `public` enum('Y','N') NOT NULL DEFAULT 'Y',
120 `priority` int(11) NOT NULL DEFAULT '0',
121 `auto_move` enum('N','Y') NOT NULL DEFAULT 'N',
122 PRIMARY KEY (`id`),
123 UNIQUE KEY `uuid` (`uuid`)
124) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1170 ;
125
126-- --------------------------------------------------------
127
128--
129-- Table structure for table `builds_bugs`
130--
131
132CREATE TABLE IF NOT EXISTS `builds_bugs` (
133 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
134 `build_id` int(10) unsigned NOT NULL,
135 `bug_id` int(10) unsigned NOT NULL,
136 PRIMARY KEY (`id`),
137 UNIQUE KEY `build_id` (`build_id`,`bug_id`)
138) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=111 ;
139
140-- --------------------------------------------------------
141
142--
143-- Table structure for table `builds_bugs_updates`
144--
145
146CREATE TABLE IF NOT EXISTS `builds_bugs_updates` (
147 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
148 `bug_id` int(10) unsigned NOT NULL,
149 `status` varchar(32) DEFAULT NULL,
150 `resolution` varchar(32) DEFAULT NULL,
151 `comment` text,
152 `time` datetime NOT NULL,
153 `error` enum('N','Y') NOT NULL DEFAULT 'N',
154 `error_msg` text,
155 PRIMARY KEY (`id`)
156) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
157
158-- --------------------------------------------------------
159
160--
161-- Table structure for table `builds_comments`
162--
163
164CREATE TABLE IF NOT EXISTS `builds_comments` (
165 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
166 `build_id` int(10) unsigned NOT NULL,
167 `user_id` int(10) unsigned NOT NULL,
168 `text` text NOT NULL,
169 `credit` tinyint(4) NOT NULL,
170 `time_created` datetime NOT NULL,
171 `time_updated` datetime DEFAULT NULL,
172 PRIMARY KEY (`id`)
173) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=82 ;
174
175-- --------------------------------------------------------
176
177--
178-- Table structure for table `builds_history`
179--
180
181CREATE TABLE IF NOT EXISTS `builds_history` (
182 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
183 `build_id` int(10) unsigned NOT NULL,
184 `action` enum('created','bug_added','bug_removed') NOT NULL,
185 `user_id` int(10) unsigned DEFAULT NULL,
186 `time` datetime NOT NULL,
187 `bug_id` int(10) unsigned DEFAULT NULL,
188 PRIMARY KEY (`id`)
189) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1282 ;
190
191-- --------------------------------------------------------
192
193--
194-- Table structure for table `builds_watchers`
195--
196
197CREATE TABLE IF NOT EXISTS `builds_watchers` (
198 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
199 `build_id` int(10) unsigned NOT NULL,
200 `user_id` int(10) unsigned NOT NULL,
201 PRIMARY KEY (`id`)
202) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
203
204-- --------------------------------------------------------
205
206--
207-- Table structure for table `distributions`
208--
209
210CREATE TABLE IF NOT EXISTS `distributions` (
211 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
212 `name` varchar(64) NOT NULL,
213 `sname` varchar(64) NOT NULL,
214 `slogan` varchar(255) NOT NULL,
215 `description` text,
216 `vendor` varchar(64) NOT NULL,
217 `contact` varchar(128) DEFAULT NULL,
218 `tag` varchar(4) NOT NULL,
219 PRIMARY KEY (`id`)
220) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
221
222-- --------------------------------------------------------
223
224--
225-- Table structure for table `distro_arches`
226--
227
228CREATE TABLE IF NOT EXISTS `distro_arches` (
229 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
230 `distro_id` int(10) unsigned NOT NULL,
231 `arch_id` int(10) unsigned NOT NULL,
232 PRIMARY KEY (`id`)
233) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ;
234
235-- --------------------------------------------------------
236
237--
238-- Table structure for table `filelists`
239--
240
241CREATE TABLE IF NOT EXISTS `filelists` (
242 `pkg_id` int(10) unsigned NOT NULL,
243 `name` varchar(1024) NOT NULL,
244 `size` int(11) NOT NULL,
245 `hash_sha512` varchar(140) DEFAULT NULL,
246 `type` tinyint(4) NOT NULL,
247 `config` enum('Y','N') NOT NULL,
248 `mode` int(11) NOT NULL,
249 `user` varchar(32) NOT NULL,
250 `group` varchar(32) NOT NULL,
251 `mtime` datetime NOT NULL,
252 `capabilities` varchar(64) DEFAULT NULL,
253 KEY `pkg_id` (`pkg_id`),
254 KEY `name` (`name`(16))
255) ENGINE=InnoDB DEFAULT CHARSET=utf8;
256
257-- --------------------------------------------------------
258
259--
260-- Table structure for table `jobs`
261--
262
263CREATE TABLE IF NOT EXISTS `jobs` (
264 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
265 `uuid` varchar(40) NOT NULL,
266 `type` enum('build','test') NOT NULL DEFAULT 'build',
267 `build_id` int(11) unsigned NOT NULL,
268 `state` enum('new','pending','running','finished','dispatching','uploading','failed','aborted','temporary_failed','dependency_error','aborted','download_error','deleted') NOT NULL DEFAULT 'new',
269 `arch_id` int(11) unsigned NOT NULL,
270 `time_created` datetime NOT NULL,
271 `time_started` datetime DEFAULT NULL,
272 `time_finished` datetime DEFAULT NULL,
273 `start_not_before` datetime DEFAULT NULL,
274 `builder_id` int(11) unsigned DEFAULT NULL,
275 `tries` int(11) unsigned NOT NULL DEFAULT '0',
276 `aborted_state` smallint(6) NOT NULL DEFAULT '0',
277 `message` text,
278 PRIMARY KEY (`id`),
279 UNIQUE KEY `uuid` (`uuid`)
280) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11998 ;
281
282-- --------------------------------------------------------
283
284--
285-- Table structure for table `jobs_buildroots`
286--
287
288CREATE TABLE IF NOT EXISTS `jobs_buildroots` (
289 `job_id` int(10) unsigned NOT NULL,
290 `tries` tinyint(3) unsigned NOT NULL,
291 `pkg_uuid` varchar(40) NOT NULL,
292 `pkg_name` varchar(1024) NOT NULL,
293 KEY `job_id` (`job_id`),
294 KEY `pkg_uuid` (`pkg_uuid`)
295) ENGINE=InnoDB DEFAULT CHARSET=utf8;
296
297-- --------------------------------------------------------
298
299--
300-- Table structure for table `jobs_history`
301--
302
303CREATE TABLE IF NOT EXISTS `jobs_history` (
304 `job_id` int(10) unsigned NOT NULL,
305 `action` enum('created','state_change','reset','schedule_rebuild','schedule_test_job') NOT NULL,
306 `state` enum('new','pending','running','finished','dispatching','uploading','failed','temporary_failed','dependency_error','aborted','download_error','deleted') DEFAULT NULL,
307 `user_id` int(10) unsigned DEFAULT NULL,
308 `time` datetime NOT NULL,
309 `builder_id` int(11) DEFAULT NULL,
310 `test_job_id` int(11) DEFAULT NULL
311) ENGINE=InnoDB DEFAULT CHARSET=utf8;
312
313-- --------------------------------------------------------
314
315--
316-- Table structure for table `jobs_packages`
317--
318
319CREATE TABLE IF NOT EXISTS `jobs_packages` (
320 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
321 `job_id` int(10) unsigned NOT NULL,
322 `pkg_id` int(10) unsigned NOT NULL,
323 PRIMARY KEY (`id`)
324) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13035 ;
325
326-- --------------------------------------------------------
327
328--
329-- Table structure for table `jobs_repos`
330--
331
332CREATE TABLE IF NOT EXISTS `jobs_repos` (
333 `job_id` int(10) unsigned NOT NULL,
334 `repo_id` int(10) unsigned NOT NULL,
335 UNIQUE KEY `job_id` (`job_id`,`repo_id`)
336) ENGINE=InnoDB DEFAULT CHARSET=utf8;
337
338-- --------------------------------------------------------
339
340--
341-- Table structure for table `keys`
342--
343
344CREATE TABLE IF NOT EXISTS `keys` (
345 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
346 `fingerprint` varchar(64) NOT NULL,
347 `uids` varchar(255) NOT NULL,
348 `data` text NOT NULL,
349 PRIMARY KEY (`id`),
350 UNIQUE KEY `fingerprint` (`fingerprint`)
351) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
352
353-- --------------------------------------------------------
354
355--
356-- Table structure for table `keys_subkeys`
357--
358
359CREATE TABLE IF NOT EXISTS `keys_subkeys` (
360 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
361 `key_id` int(10) unsigned NOT NULL,
362 `fingerprint` varchar(64) NOT NULL,
363 `time_created` datetime NOT NULL,
364 `time_expires` datetime DEFAULT NULL,
365 `algo` varchar(16) DEFAULT NULL,
366 PRIMARY KEY (`id`)
367) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;
368
369-- --------------------------------------------------------
370
371--
372-- Table structure for table `logfiles`
373--
374
375CREATE TABLE IF NOT EXISTS `logfiles` (
376 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
377 `job_id` int(10) unsigned NOT NULL,
378 `path` varchar(255) NOT NULL,
379 `filesize` int(10) unsigned NOT NULL,
380 `hash_sha512` varchar(140) NOT NULL,
381 PRIMARY KEY (`id`)
382) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12739 ;
383
384-- --------------------------------------------------------
385
386--
387-- Table structure for table `mirrors`
388--
389
390CREATE TABLE IF NOT EXISTS `mirrors` (
391 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
392 `hostname` varchar(128) NOT NULL,
393 `path` varchar(128) NOT NULL,
394 `owner` varchar(128) DEFAULT NULL,
395 `contact` varchar(128) DEFAULT NULL,
396 `status` enum('enabled','disabled','deleted') NOT NULL DEFAULT 'disabled',
397 `check_status` enum('UNKNOWN','UP','DOWN') NOT NULL DEFAULT 'UNKNOWN',
398 `last_check` datetime DEFAULT NULL,
399 PRIMARY KEY (`id`)
400) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
401
402-- --------------------------------------------------------
403
404--
405-- Table structure for table `mirrors_history`
406--
407
408CREATE TABLE IF NOT EXISTS `mirrors_history` (
409 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
410 `mirror_id` int(10) unsigned NOT NULL,
411 `action` enum('created','enabled','disabled','deleted') NOT NULL,
412 `user_id` int(10) unsigned DEFAULT NULL,
413 `time` datetime NOT NULL,
414 PRIMARY KEY (`id`)
415) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
416
417-- --------------------------------------------------------
418
419--
420-- Table structure for table `packages`
421--
422
423CREATE TABLE IF NOT EXISTS `packages` (
424 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
425 `name` varchar(128) NOT NULL,
426 `epoch` int(11) unsigned NOT NULL,
427 `version` varchar(128) NOT NULL,
428 `release` varchar(32) NOT NULL,
429 `type` enum('source','binary') NOT NULL,
430 `arch` tinyint(3) unsigned NOT NULL,
431 `groups` varchar(1024) NOT NULL,
432 `maintainer` varchar(128) NOT NULL,
433 `license` varchar(128) NOT NULL,
434 `url` varchar(1024) NOT NULL,
435 `summary` text NOT NULL,
436 `description` text NOT NULL,
437 `size` int(10) unsigned NOT NULL,
438 `supported_arches` varchar(64) DEFAULT NULL,
439 `uuid` varchar(40) NOT NULL,
440 `commit_id` int(10) unsigned DEFAULT NULL,
441 `build_id` varchar(40) NOT NULL,
442 `build_host` varchar(128) NOT NULL,
443 `build_time` datetime NOT NULL,
444 `path` varchar(255) NOT NULL,
445 `filesize` int(10) unsigned NOT NULL,
446 `hash_sha512` varchar(140) NOT NULL,
447 PRIMARY KEY (`id`),
448 KEY `uuid` (`uuid`),
449 FULLTEXT KEY `search` (`name`,`summary`,`description`)
450) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=14241 ;
451
452-- --------------------------------------------------------
453
454--
455-- Table structure for table `packages_deps`
456--
457
458CREATE TABLE IF NOT EXISTS `packages_deps` (
459 `pkg_id` int(10) unsigned NOT NULL,
460 `type` enum('requires','prerequires','provides','conflicts','obsoletes','suggests','recommends') NOT NULL,
461 `what` varchar(1024) NOT NULL,
462 KEY `pkg_id` (`pkg_id`)
463) ENGINE=InnoDB DEFAULT CHARSET=utf8;
464
465-- --------------------------------------------------------
466
467--
468-- Table structure for table `packages_properties`
469--
470
471CREATE TABLE IF NOT EXISTS `packages_properties` (
472 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
473 `name` varchar(128) NOT NULL,
474 `critical_path` enum('N','Y') NOT NULL DEFAULT 'N',
475 `priority` tinyint(4) NOT NULL DEFAULT '0',
476 PRIMARY KEY (`id`),
477 UNIQUE KEY `name` (`name`)
478) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
479
480-- --------------------------------------------------------
481
482--
483-- Table structure for table `queue_delete`
484--
485
486CREATE TABLE IF NOT EXISTS `queue_delete` (
487 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
488 `path` varchar(1024) NOT NULL,
489 PRIMARY KEY (`id`)
490) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
491
492-- --------------------------------------------------------
493
494--
495-- Table structure for table `repositories`
496--
497
498CREATE TABLE IF NOT EXISTS `repositories` (
499 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
500 `name` varchar(64) NOT NULL,
501 `type` enum('testing','unstable','stable') NOT NULL DEFAULT 'testing',
502 `description` text NOT NULL,
503 `distro_id` int(10) unsigned NOT NULL,
504 `parent_id` int(10) unsigned DEFAULT NULL,
505 `key_id` int(10) unsigned DEFAULT NULL,
506 `mirrored` enum('N','Y') NOT NULL DEFAULT 'N',
507 `enabled_for_builds` enum('N','Y') NOT NULL DEFAULT 'N',
508 `score_needed` int(10) unsigned NOT NULL DEFAULT '0',
509 `last_update` datetime DEFAULT NULL,
510 `time_min` int(10) unsigned NOT NULL DEFAULT '0',
511 `time_max` int(10) unsigned NOT NULL DEFAULT '0',
512 `update_started` datetime DEFAULT NULL,
513 `update_ended` datetime DEFAULT NULL,
514 PRIMARY KEY (`id`)
515) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
516
517-- --------------------------------------------------------
518
519--
520-- Table structure for table `repositories_aux`
521--
522
523CREATE TABLE IF NOT EXISTS `repositories_aux` (
524 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
525 `name` varchar(32) NOT NULL,
526 `description` text,
527 `url` varchar(128) NOT NULL,
528 `distro_id` int(10) unsigned NOT NULL,
529 `status` enum('enabled','disabled') NOT NULL DEFAULT 'disabled',
530 PRIMARY KEY (`id`)
531) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
532
533-- --------------------------------------------------------
534
535--
536-- Table structure for table `repositories_builds`
537--
538
539CREATE TABLE IF NOT EXISTS `repositories_builds` (
540 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
541 `repo_id` int(10) unsigned NOT NULL,
542 `build_id` int(10) unsigned NOT NULL,
543 `time_added` datetime NOT NULL,
544 PRIMARY KEY (`id`),
545 UNIQUE KEY `build_id` (`build_id`)
546) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=805 ;
547
548-- --------------------------------------------------------
549
550--
551-- Table structure for table `repositories_history`
552--
553
554CREATE TABLE IF NOT EXISTS `repositories_history` (
555 `build_id` int(10) unsigned NOT NULL,
556 `action` enum('added','removed','moved') NOT NULL,
557 `from_repo_id` int(10) unsigned DEFAULT NULL,
558 `to_repo_id` int(10) unsigned DEFAULT NULL,
559 `user_id` int(10) unsigned DEFAULT NULL,
560 `time` datetime NOT NULL,
561 KEY `build_id` (`build_id`)
562) ENGINE=InnoDB DEFAULT CHARSET=utf8;
563
564-- --------------------------------------------------------
565
566--
567-- Table structure for table `sessions`
568--
569
570CREATE TABLE IF NOT EXISTS `sessions` (
571 `session_id` varchar(64) NOT NULL,
572 `user_id` int(11) NOT NULL,
573 `impersonated_user_id` int(10) unsigned DEFAULT NULL,
574 `creation_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
575 `valid_until` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
576 `from_address` varchar(255) DEFAULT NULL,
577 UNIQUE KEY `session_id` (`session_id`)
578) ENGINE=InnoDB DEFAULT CHARSET=utf8;
579
580-- --------------------------------------------------------
581
582--
583-- Table structure for table `settings`
584--
585
586CREATE TABLE IF NOT EXISTS `settings` (
587 `k` varchar(255) NOT NULL,
588 `v` varchar(1024) NOT NULL,
589 UNIQUE KEY `k` (`k`)
590) ENGINE=InnoDB DEFAULT CHARSET=utf8;
591
592-- --------------------------------------------------------
593
594--
595-- Table structure for table `slogans`
596--
597
598CREATE TABLE IF NOT EXISTS `slogans` (
599 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
600 `message` varchar(64) NOT NULL,
601 PRIMARY KEY (`id`)
602) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
603
604-- --------------------------------------------------------
605
606--
607-- Table structure for table `sources`
608--
609
610CREATE TABLE IF NOT EXISTS `sources` (
611 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
612 `name` varchar(128) NOT NULL,
613 `identifier` varchar(128) NOT NULL,
614 `url` varchar(1024) NOT NULL,
615 `gitweb` varchar(255) DEFAULT NULL,
616 `revision` varchar(40) NOT NULL,
617 `branch` varchar(32) NOT NULL,
618 `updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
619 `distro_id` int(11) NOT NULL,
620 PRIMARY KEY (`id`),
621 UNIQUE KEY `identifier` (`identifier`)
622) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
623
624-- --------------------------------------------------------
625
626--
627-- Table structure for table `sources_commits`
628--
629
630CREATE TABLE IF NOT EXISTS `sources_commits` (
631 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
632 `source_id` int(10) unsigned NOT NULL,
633 `revision` varchar(40) NOT NULL,
634 `author` varchar(1024) NOT NULL,
635 `committer` varchar(1024) NOT NULL,
636 `subject` varchar(1024) NOT NULL,
637 `body` text NOT NULL,
638 `date` datetime NOT NULL,
639 `state` enum('pending','running','finished','failed') NOT NULL DEFAULT 'pending',
640 PRIMARY KEY (`id`),
641 KEY `revision` (`revision`)
642) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=487 ;
643
644-- --------------------------------------------------------
645
646--
647-- Table structure for table `uploads`
648--
649
650CREATE TABLE IF NOT EXISTS `uploads` (
651 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
652 `uuid` varchar(40) NOT NULL,
653 `user_id` int(10) unsigned DEFAULT NULL,
654 `builder_id` int(11) unsigned DEFAULT NULL,
655 `filename` varchar(1024) NOT NULL,
656 `hash` varchar(40) NOT NULL,
657 `size` int(11) NOT NULL,
658 `progress` int(11) NOT NULL DEFAULT '0',
659 `finished` enum('N','Y') NOT NULL DEFAULT 'N',
660 `time_started` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
661 `time_finished` datetime DEFAULT NULL,
662 PRIMARY KEY (`id`),
663 UNIQUE KEY `uuid` (`uuid`)
664) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=36 ;
665
666-- --------------------------------------------------------
667
668--
669-- Table structure for table `users`
670--
671
672CREATE TABLE IF NOT EXISTS `users` (
673 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
674 `name` varchar(32) NOT NULL,
675 `realname` varchar(255) DEFAULT NULL,
676 `passphrase` varchar(153) NOT NULL,
677 `state` enum('user','tester','admin') NOT NULL,
678 `locale` varchar(8) DEFAULT NULL,
679 `timezone` varchar(64) DEFAULT NULL,
680 `activated` enum('Y','N') NOT NULL DEFAULT 'N',
681 `activation_code` varchar(20) DEFAULT NULL,
682 `deleted` enum('Y','N') NOT NULL DEFAULT 'N',
683 `registered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
684 PRIMARY KEY (`id`),
685 UNIQUE KEY `name` (`name`),
686 FULLTEXT KEY `search` (`name`,`realname`)
687) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=35 ;
688
689-- --------------------------------------------------------
690
691--
692-- Table structure for table `users_emails`
693--
694
695CREATE TABLE IF NOT EXISTS `users_emails` (
696 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
697 `user_id` int(10) unsigned NOT NULL,
698 `email` varchar(128) NOT NULL,
699 `primary` enum('N','Y') NOT NULL DEFAULT 'N',
700 PRIMARY KEY (`id`),
701 UNIQUE KEY `email` (`email`),
702 KEY `user_id` (`user_id`)
703) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
704
705-- --------------------------------------------------------
706
707--
708-- Table structure for table `users_permissions`
709--
710
711CREATE TABLE IF NOT EXISTS `users_permissions` (
712 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
713 `user_id` int(10) unsigned NOT NULL,
714 `create_scratch_builds` enum('Y','N') NOT NULL DEFAULT 'N',
715 `maintain_builders` enum('N','Y') NOT NULL DEFAULT 'N',
716 `manage_critical_path` enum('N','Y') NOT NULL DEFAULT 'N',
717 `manage_mirrors` enum('N','Y') NOT NULL DEFAULT 'N',
718 `vote` enum('N','Y') NOT NULL DEFAULT 'N',
719 PRIMARY KEY (`id`)
720) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
721
722-- --------------------------------------------------------
723
724--
725-- Table structure for table `user_messages`
726--
727
728CREATE TABLE IF NOT EXISTS `user_messages` (
729 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
730 `frm` varchar(255) NOT NULL,
731 `to` varchar(2048) NOT NULL,
732 `subject` varchar(1024) NOT NULL,
733 `text` text NOT NULL,
734 `time_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
735 PRIMARY KEY (`id`)
736) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
737
738/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
739/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
740/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;