Home | History | Annotate | Download | only in database
      1 -- MySQL dump 10.11
      2 --
      3 -- Host: localhost    Database: autotest_web
      4 -- ------------------------------------------------------
      5 -- Server version	5.0.51a-3ubuntu5.5-log
      6 
      7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
      8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
      9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
     10 /*!40101 SET NAMES utf8 */;
     11 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
     12 /*!40103 SET TIME_ZONE='+00:00' */;
     13 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
     14 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
     15 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
     16 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
     17 
     18 --
     19 -- Table structure for table `afe_aborted_host_queue_entries`
     20 --
     21 
     22 DROP TABLE IF EXISTS `afe_aborted_host_queue_entries`;
     23 SET @saved_cs_client     = @@character_set_client;
     24 SET character_set_client = utf8;
     25 CREATE TABLE `afe_aborted_host_queue_entries` (
     26   `queue_entry_id` int(11) NOT NULL,
     27   `aborted_by_id` int(11) NOT NULL,
     28   `aborted_on` datetime NOT NULL,
     29   PRIMARY KEY  (`queue_entry_id`),
     30   KEY `aborted_host_queue_entries_aborted_by_id_fk` (`aborted_by_id`),
     31   CONSTRAINT `aborted_host_queue_entries_aborted_by_id_fk` FOREIGN KEY (`aborted_by_id`) REFERENCES `afe_users` (`id`) ON DELETE NO ACTION,
     32   CONSTRAINT `aborted_host_queue_entries_queue_entry_id_fk` FOREIGN KEY (`queue_entry_id`) REFERENCES `afe_host_queue_entries` (`id`) ON DELETE NO ACTION
     33 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
     34 SET character_set_client = @saved_cs_client;
     35 
     36 --
     37 -- Table structure for table `afe_acl_groups`
     38 --
     39 
     40 DROP TABLE IF EXISTS `afe_acl_groups`;
     41 SET @saved_cs_client     = @@character_set_client;
     42 SET character_set_client = utf8;
     43 CREATE TABLE `afe_acl_groups` (
     44   `id` int(11) NOT NULL auto_increment,
     45   `name` varchar(255) default NULL,
     46   `description` varchar(255) default NULL,
     47   PRIMARY KEY  (`id`)
     48 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
     49 SET character_set_client = @saved_cs_client;
     50 
     51 --
     52 -- Table structure for table `afe_acl_groups_hosts`
     53 --
     54 
     55 DROP TABLE IF EXISTS `afe_acl_groups_hosts`;
     56 SET @saved_cs_client     = @@character_set_client;
     57 SET character_set_client = utf8;
     58 CREATE TABLE `afe_acl_groups_hosts` (
     59   `aclgroup_id` int(11) default NULL,
     60   `host_id` int(11) default NULL,
     61   UNIQUE KEY `acl_groups_hosts_both_ids` (`aclgroup_id`,`host_id`),
     62   KEY `acl_groups_hosts_host_id` (`host_id`),
     63   CONSTRAINT `acl_groups_hosts_aclgroup_id_fk` FOREIGN KEY (`aclgroup_id`) REFERENCES `afe_acl_groups` (`id`) ON DELETE NO ACTION,
     64   CONSTRAINT `acl_groups_hosts_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`) ON DELETE NO ACTION
     65 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
     66 SET character_set_client = @saved_cs_client;
     67 
     68 --
     69 -- Table structure for table `afe_acl_groups_users`
     70 --
     71 
     72 DROP TABLE IF EXISTS `afe_acl_groups_users`;
     73 SET @saved_cs_client     = @@character_set_client;
     74 SET character_set_client = utf8;
     75 CREATE TABLE `afe_acl_groups_users` (
     76   `aclgroup_id` int(11) default NULL,
     77   `user_id` int(11) default NULL,
     78   UNIQUE KEY `acl_groups_users_both_ids` (`aclgroup_id`,`user_id`),
     79   KEY `acl_groups_users_user_id` (`user_id`),
     80   CONSTRAINT `acl_groups_users_aclgroup_id_fk` FOREIGN KEY (`aclgroup_id`) REFERENCES `afe_acl_groups` (`id`) ON DELETE NO ACTION,
     81   CONSTRAINT `acl_groups_users_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `afe_users` (`id`) ON DELETE NO ACTION
     82 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
     83 SET character_set_client = @saved_cs_client;
     84 
     85 --
     86 -- Table structure for table `afe_atomic_groups`
     87 --
     88 
     89 DROP TABLE IF EXISTS `afe_atomic_groups`;
     90 SET @saved_cs_client     = @@character_set_client;
     91 SET character_set_client = utf8;
     92 CREATE TABLE `afe_atomic_groups` (
     93   `id` int(11) NOT NULL auto_increment,
     94   `name` varchar(255) NOT NULL,
     95   `description` longtext,
     96   `max_number_of_machines` int(11) NOT NULL,
     97   `invalid` tinyint(1) NOT NULL,
     98   PRIMARY KEY  (`id`),
     99   UNIQUE KEY `name` (`name`)
    100 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    101 SET character_set_client = @saved_cs_client;
    102 
    103 --
    104 -- Table structure for table `afe_autotests`
    105 --
    106 
    107 DROP TABLE IF EXISTS `afe_autotests`;
    108 SET @saved_cs_client     = @@character_set_client;
    109 SET character_set_client = utf8;
    110 CREATE TABLE `afe_autotests` (
    111   `id` int(11) NOT NULL auto_increment,
    112   `name` varchar(255) default NULL,
    113   `test_class` varchar(255) default NULL,
    114   `description` text,
    115   `test_type` int(11) default NULL,
    116   `path` varchar(255) default NULL,
    117   `author` varchar(256) default NULL,
    118   `dependencies` varchar(256) default NULL,
    119   `experimental` smallint(6) default '0',
    120   `run_verify` smallint(6) default '1',
    121   `test_time` smallint(6) default '1',
    122   `test_category` varchar(256) default NULL,
    123   `sync_count` int(11) default '1',
    124   PRIMARY KEY  (`id`)
    125 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    126 SET character_set_client = @saved_cs_client;
    127 
    128 --
    129 -- Table structure for table `afe_autotests_dependency_labels`
    130 --
    131 
    132 DROP TABLE IF EXISTS `afe_autotests_dependency_labels`;
    133 SET @saved_cs_client     = @@character_set_client;
    134 SET character_set_client = utf8;
    135 CREATE TABLE `afe_autotests_dependency_labels` (
    136   `id` int(11) NOT NULL auto_increment,
    137   `test_id` int(11) NOT NULL,
    138   `label_id` int(11) NOT NULL,
    139   PRIMARY KEY  (`id`),
    140   UNIQUE KEY `test_id` (`test_id`,`label_id`),
    141   KEY `autotests_dependency_labels_label_id_fk` (`label_id`),
    142   CONSTRAINT `autotests_dependency_labels_label_id_fk` FOREIGN KEY (`label_id`) REFERENCES `afe_labels` (`id`) ON DELETE NO ACTION,
    143   CONSTRAINT `autotests_dependency_labels_test_id_fk` FOREIGN KEY (`test_id`) REFERENCES `afe_autotests` (`id`) ON DELETE NO ACTION
    144 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    145 SET character_set_client = @saved_cs_client;
    146 
    147 --
    148 -- Table structure for table `afe_host_attributes`
    149 --
    150 
    151 DROP TABLE IF EXISTS `afe_host_attributes`;
    152 SET @saved_cs_client     = @@character_set_client;
    153 SET character_set_client = utf8;
    154 CREATE TABLE `afe_host_attributes` (
    155   `id` int(11) NOT NULL auto_increment,
    156   `host_id` int(11) NOT NULL,
    157   `attribute` varchar(90) NOT NULL,
    158   `value` varchar(300) NOT NULL,
    159   PRIMARY KEY  (`id`),
    160   KEY `host_id` (`host_id`),
    161   KEY `attribute` (`attribute`),
    162   CONSTRAINT `afe_host_attributes_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`)
    163 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    164 SET character_set_client = @saved_cs_client;
    165 
    166 --
    167 -- Table structure for table `afe_host_queue_entries`
    168 --
    169 
    170 DROP TABLE IF EXISTS `afe_host_queue_entries`;
    171 SET @saved_cs_client     = @@character_set_client;
    172 SET character_set_client = utf8;
    173 CREATE TABLE `afe_host_queue_entries` (
    174   `id` int(11) NOT NULL auto_increment,
    175   `job_id` int(11) default NULL,
    176   `host_id` int(11) default NULL,
    177   `status` varchar(255) default NULL,
    178   `meta_host` int(11) default NULL,
    179   `active` tinyint(1) default '0',
    180   `complete` tinyint(1) default '0',
    181   `deleted` tinyint(1) NOT NULL,
    182   `execution_subdir` varchar(255) NOT NULL,
    183   `atomic_group_id` int(11) default NULL,
    184   `aborted` tinyint(1) NOT NULL default '0',
    185   `started_on` datetime default NULL,
    186   PRIMARY KEY  (`id`),
    187   UNIQUE KEY `host_queue_entries_job_id_and_host_id` (`job_id`,`host_id`),
    188   KEY `host_queue_entries_host_id` (`host_id`),
    189   KEY `host_queue_entries_meta_host` (`meta_host`),
    190   KEY `atomic_group_id` (`atomic_group_id`),
    191   CONSTRAINT `afe_host_queue_entries_ibfk_1` FOREIGN KEY (`atomic_group_id`) REFERENCES `afe_atomic_groups` (`id`) ON DELETE NO ACTION,
    192   CONSTRAINT `host_queue_entries_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`) ON DELETE NO ACTION,
    193   CONSTRAINT `host_queue_entries_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `afe_jobs` (`id`) ON DELETE NO ACTION,
    194   CONSTRAINT `host_queue_entries_meta_host_fk` FOREIGN KEY (`meta_host`) REFERENCES `afe_labels` (`id`) ON DELETE NO ACTION
    195 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    196 SET character_set_client = @saved_cs_client;
    197 
    198 --
    199 -- Table structure for table `afe_hosts`
    200 --
    201 
    202 DROP TABLE IF EXISTS `afe_hosts`;
    203 SET @saved_cs_client     = @@character_set_client;
    204 SET character_set_client = utf8;
    205 CREATE TABLE `afe_hosts` (
    206   `id` int(11) NOT NULL auto_increment,
    207   `hostname` varchar(255) default NULL,
    208   `locked` tinyint(1) default '0',
    209   `synch_id` int(11) default NULL,
    210   `status` varchar(255) default NULL,
    211   `invalid` tinyint(1) default '0',
    212   `protection` int(11) NOT NULL,
    213   `locked_by_id` int(11) default NULL,
    214   `lock_time` datetime default NULL,
    215   `dirty` tinyint(1) NOT NULL,
    216   PRIMARY KEY  (`id`),
    217   KEY `hosts_locked_by_fk` (`locked_by_id`),
    218   CONSTRAINT `hosts_locked_by_fk` FOREIGN KEY (`locked_by_id`) REFERENCES `afe_users` (`id`) ON DELETE NO ACTION
    219 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    220 SET character_set_client = @saved_cs_client;
    221 
    222 --
    223 -- Table structure for table `afe_hosts_labels`
    224 --
    225 
    226 DROP TABLE IF EXISTS `afe_hosts_labels`;
    227 SET @saved_cs_client     = @@character_set_client;
    228 SET character_set_client = utf8;
    229 CREATE TABLE `afe_hosts_labels` (
    230   `host_id` int(11) default NULL,
    231   `label_id` int(11) default NULL,
    232   UNIQUE KEY `hosts_labels_both_ids` (`label_id`,`host_id`),
    233   KEY `hosts_labels_host_id` (`host_id`),
    234   CONSTRAINT `hosts_labels_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`) ON DELETE NO ACTION,
    235   CONSTRAINT `hosts_labels_label_id_fk` FOREIGN KEY (`label_id`) REFERENCES `afe_labels` (`id`) ON DELETE NO ACTION
    236 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    237 SET character_set_client = @saved_cs_client;
    238 
    239 --
    240 -- Table structure for table `afe_ineligible_host_queues`
    241 --
    242 
    243 DROP TABLE IF EXISTS `afe_ineligible_host_queues`;
    244 SET @saved_cs_client     = @@character_set_client;
    245 SET character_set_client = utf8;
    246 CREATE TABLE `afe_ineligible_host_queues` (
    247   `id` int(11) NOT NULL auto_increment,
    248   `job_id` int(11) default NULL,
    249   `host_id` int(11) default NULL,
    250   PRIMARY KEY  (`id`),
    251   UNIQUE KEY `ineligible_host_queues_both_ids` (`host_id`,`job_id`),
    252   KEY `ineligible_host_queues_job_id` (`job_id`),
    253   CONSTRAINT `ineligible_host_queues_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`) ON DELETE NO ACTION,
    254   CONSTRAINT `ineligible_host_queues_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `afe_jobs` (`id`) ON DELETE NO ACTION
    255 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    256 SET character_set_client = @saved_cs_client;
    257 
    258 --
    259 -- Table structure for table `afe_job_keyvals`
    260 --
    261 
    262 DROP TABLE IF EXISTS `afe_job_keyvals`;
    263 SET @saved_cs_client     = @@character_set_client;
    264 SET character_set_client = utf8;
    265 CREATE TABLE `afe_job_keyvals` (
    266   `id` int(11) NOT NULL auto_increment,
    267   `job_id` int(11) NOT NULL,
    268   `key` varchar(90) NOT NULL,
    269   `value` varchar(300) NOT NULL,
    270   PRIMARY KEY  (`id`),
    271   KEY `afe_job_keyvals_job_id` (`job_id`),
    272   KEY `afe_job_keyvals_key` (`key`),
    273   CONSTRAINT `afe_job_keyvals_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `afe_jobs` (`id`) ON DELETE NO ACTION
    274 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    275 SET character_set_client = @saved_cs_client;
    276 
    277 --
    278 -- Table structure for table `afe_jobs`
    279 --
    280 
    281 DROP TABLE IF EXISTS `afe_jobs`;
    282 SET @saved_cs_client     = @@character_set_client;
    283 SET character_set_client = utf8;
    284 CREATE TABLE `afe_jobs` (
    285   `id` int(11) NOT NULL auto_increment,
    286   `owner` varchar(255) default NULL,
    287   `name` varchar(255) default NULL,
    288   `priority` int(11) default NULL,
    289   `control_file` text,
    290   `control_type` int(11) default NULL,
    291   `created_on` datetime default NULL,
    292   `synch_count` int(11) default NULL,
    293   `timeout` int(11) NOT NULL,
    294   `run_verify` tinyint(1) default '1',
    295   `email_list` varchar(250) NOT NULL,
    296   `reboot_before` smallint(6) NOT NULL,
    297   `reboot_after` smallint(6) NOT NULL,
    298   `parse_failed_repair` tinyint(1) NOT NULL default '1',
    299   `max_runtime_hrs` int(11) NOT NULL,
    300   PRIMARY KEY  (`id`)
    301 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    302 SET character_set_client = @saved_cs_client;
    303 
    304 --
    305 -- Table structure for table `afe_jobs_dependency_labels`
    306 --
    307 
    308 DROP TABLE IF EXISTS `afe_jobs_dependency_labels`;
    309 SET @saved_cs_client     = @@character_set_client;
    310 SET character_set_client = utf8;
    311 CREATE TABLE `afe_jobs_dependency_labels` (
    312   `id` int(11) NOT NULL auto_increment,
    313   `job_id` int(11) NOT NULL,
    314   `label_id` int(11) NOT NULL,
    315   PRIMARY KEY  (`id`),
    316   UNIQUE KEY `job_id` (`job_id`,`label_id`),
    317   KEY `jobs_dependency_labels_label_id_fk` (`label_id`),
    318   CONSTRAINT `jobs_dependency_labels_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `afe_jobs` (`id`) ON DELETE NO ACTION,
    319   CONSTRAINT `jobs_dependency_labels_label_id_fk` FOREIGN KEY (`label_id`) REFERENCES `afe_labels` (`id`) ON DELETE NO ACTION
    320 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    321 SET character_set_client = @saved_cs_client;
    322 
    323 --
    324 -- Table structure for table `afe_labels`
    325 --
    326 
    327 DROP TABLE IF EXISTS `afe_labels`;
    328 SET @saved_cs_client     = @@character_set_client;
    329 SET character_set_client = utf8;
    330 CREATE TABLE `afe_labels` (
    331   `id` int(11) NOT NULL auto_increment,
    332   `name` varchar(750) default NULL,
    333   `kernel_config` varchar(255) default NULL,
    334   `platform` tinyint(1) default '0',
    335   `invalid` tinyint(1) NOT NULL,
    336   `only_if_needed` tinyint(1) NOT NULL,
    337   `atomic_group_id` int(11) default NULL,
    338   PRIMARY KEY  (`id`),
    339   UNIQUE KEY `name` (`name`),
    340   KEY `atomic_group_id` (`atomic_group_id`),
    341   CONSTRAINT `afe_labels_ibfk_1` FOREIGN KEY (`atomic_group_id`) REFERENCES `afe_atomic_groups` (`id`) ON DELETE NO ACTION
    342 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    343 SET character_set_client = @saved_cs_client;
    344 
    345 --
    346 -- Table structure for table `afe_profilers`
    347 --
    348 
    349 DROP TABLE IF EXISTS `afe_profilers`;
    350 SET @saved_cs_client     = @@character_set_client;
    351 SET character_set_client = utf8;
    352 CREATE TABLE `afe_profilers` (
    353   `id` int(11) NOT NULL auto_increment,
    354   `name` varchar(255) NOT NULL,
    355   `description` longtext NOT NULL,
    356   PRIMARY KEY  (`id`),
    357   UNIQUE KEY `name` (`name`)
    358 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    359 SET character_set_client = @saved_cs_client;
    360 
    361 --
    362 -- Table structure for table `afe_recurring_run`
    363 --
    364 
    365 DROP TABLE IF EXISTS `afe_recurring_run`;
    366 SET @saved_cs_client     = @@character_set_client;
    367 SET character_set_client = utf8;
    368 CREATE TABLE `afe_recurring_run` (
    369   `id` int(11) NOT NULL auto_increment,
    370   `job_id` int(11) NOT NULL,
    371   `owner_id` int(11) NOT NULL,
    372   `start_date` datetime NOT NULL,
    373   `loop_period` int(11) NOT NULL,
    374   `loop_count` int(11) NOT NULL,
    375   PRIMARY KEY  (`id`),
    376   KEY `recurring_run_job_id` (`job_id`),
    377   KEY `recurring_run_owner_id` (`owner_id`),
    378   CONSTRAINT `recurring_run_job_id_fk` FOREIGN KEY (`job_id`) REFERENCES `afe_jobs` (`id`) ON DELETE NO ACTION,
    379   CONSTRAINT `recurring_run_owner_id_fk` FOREIGN KEY (`owner_id`) REFERENCES `afe_users` (`id`) ON DELETE NO ACTION
    380 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    381 SET character_set_client = @saved_cs_client;
    382 
    383 --
    384 -- Table structure for table `afe_special_tasks`
    385 --
    386 
    387 DROP TABLE IF EXISTS `afe_special_tasks`;
    388 SET @saved_cs_client     = @@character_set_client;
    389 SET character_set_client = utf8;
    390 CREATE TABLE `afe_special_tasks` (
    391   `id` int(11) NOT NULL auto_increment,
    392   `host_id` int(11) NOT NULL,
    393   `task` varchar(64) NOT NULL,
    394   `time_requested` datetime NOT NULL,
    395   `is_active` tinyint(1) NOT NULL default '0',
    396   `is_complete` tinyint(1) NOT NULL default '0',
    397   `time_started` datetime default NULL,
    398   `queue_entry_id` int(11) default NULL,
    399   `success` tinyint(1) NOT NULL default '0',
    400   `requested_by_id` int(11) default NULL,
    401   PRIMARY KEY  (`id`),
    402   KEY `special_tasks_host_id` (`host_id`),
    403   KEY `special_tasks_host_queue_entry_id` (`queue_entry_id`),
    404   KEY `special_tasks_requested_by_id` (`requested_by_id`),
    405   CONSTRAINT `special_tasks_requested_by_id` FOREIGN KEY (`requested_by_id`) REFERENCES `afe_users` (`id`) ON DELETE NO ACTION,
    406   CONSTRAINT `special_tasks_to_hosts_ibfk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`),
    407   CONSTRAINT `special_tasks_to_host_queue_entries_ibfk` FOREIGN KEY (`queue_entry_id`) REFERENCES `afe_host_queue_entries` (`id`)
    408 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    409 SET character_set_client = @saved_cs_client;
    410 
    411 --
    412 -- Table structure for table `afe_users`
    413 --
    414 
    415 DROP TABLE IF EXISTS `afe_users`;
    416 SET @saved_cs_client     = @@character_set_client;
    417 SET character_set_client = utf8;
    418 CREATE TABLE `afe_users` (
    419   `id` int(11) NOT NULL auto_increment,
    420   `login` varchar(255) default NULL,
    421   `access_level` int(11) default '0',
    422   `reboot_before` smallint(6) NOT NULL,
    423   `reboot_after` smallint(6) NOT NULL,
    424   `show_experimental` tinyint(1) NOT NULL default '0',
    425   PRIMARY KEY  (`id`)
    426 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    427 SET character_set_client = @saved_cs_client;
    428 
    429 --
    430 -- Table structure for table `planner_autoprocess`
    431 --
    432 
    433 DROP TABLE IF EXISTS `planner_autoprocess`;
    434 SET @saved_cs_client     = @@character_set_client;
    435 SET character_set_client = utf8;
    436 CREATE TABLE `planner_autoprocess` (
    437   `id` int(11) NOT NULL auto_increment,
    438   `plan_id` int(11) NOT NULL,
    439   `condition` longtext NOT NULL,
    440   `enabled` tinyint(1) NOT NULL,
    441   `reason_override` varchar(255) default NULL,
    442   PRIMARY KEY  (`id`),
    443   KEY `planner_autoprocess_plan_id` (`plan_id`),
    444   CONSTRAINT `autoprocess_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`)
    445 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    446 SET character_set_client = @saved_cs_client;
    447 
    448 --
    449 -- Table structure for table `planner_autoprocess_bugs`
    450 --
    451 
    452 DROP TABLE IF EXISTS `planner_autoprocess_bugs`;
    453 SET @saved_cs_client     = @@character_set_client;
    454 SET character_set_client = utf8;
    455 CREATE TABLE `planner_autoprocess_bugs` (
    456   `id` int(11) NOT NULL auto_increment,
    457   `autoprocess_id` int(11) NOT NULL,
    458   `bug_id` int(11) NOT NULL,
    459   PRIMARY KEY  (`id`),
    460   UNIQUE KEY `autoprocess_id` (`autoprocess_id`,`bug_id`),
    461   KEY `autoprocess_bugs_bug_id_fk` (`bug_id`),
    462   CONSTRAINT `autoprocess_bugs_autoprocess_id_fk` FOREIGN KEY (`autoprocess_id`) REFERENCES `planner_autoprocess` (`id`),
    463   CONSTRAINT `autoprocess_bugs_bug_id_fk` FOREIGN KEY (`bug_id`) REFERENCES `planner_bugs` (`id`)
    464 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    465 SET character_set_client = @saved_cs_client;
    466 
    467 --
    468 -- Table structure for table `planner_autoprocess_keyvals`
    469 --
    470 
    471 DROP TABLE IF EXISTS `planner_autoprocess_keyvals`;
    472 SET @saved_cs_client     = @@character_set_client;
    473 SET character_set_client = utf8;
    474 CREATE TABLE `planner_autoprocess_keyvals` (
    475   `id` int(11) NOT NULL auto_increment,
    476   `autoprocess_id` int(11) NOT NULL,
    477   `keyval_id` int(11) NOT NULL,
    478   PRIMARY KEY  (`id`),
    479   UNIQUE KEY `autoprocess_id` (`autoprocess_id`,`keyval_id`),
    480   KEY `autoprocess_keyvals_keyval_id_fk` (`keyval_id`),
    481   CONSTRAINT `autoprocess_keyvals_autoprocess_id_fk` FOREIGN KEY (`autoprocess_id`) REFERENCES `planner_autoprocess` (`id`),
    482   CONSTRAINT `autoprocess_keyvals_keyval_id_fk` FOREIGN KEY (`keyval_id`) REFERENCES `planner_keyvals` (`id`)
    483 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    484 SET character_set_client = @saved_cs_client;
    485 
    486 --
    487 -- Table structure for table `planner_autoprocess_labels`
    488 --
    489 
    490 DROP TABLE IF EXISTS `planner_autoprocess_labels`;
    491 SET @saved_cs_client     = @@character_set_client;
    492 SET character_set_client = utf8;
    493 CREATE TABLE `planner_autoprocess_labels` (
    494   `id` int(11) NOT NULL auto_increment,
    495   `autoprocess_id` int(11) NOT NULL,
    496   `testlabel_id` int(11) NOT NULL,
    497   PRIMARY KEY  (`id`),
    498   UNIQUE KEY `autoprocess_id` (`autoprocess_id`,`testlabel_id`),
    499   KEY `autoprocess_labels_testlabel_id_fk` (`testlabel_id`),
    500   CONSTRAINT `autoprocess_labels_autoprocess_id_fk` FOREIGN KEY (`autoprocess_id`) REFERENCES `planner_autoprocess` (`id`),
    501   CONSTRAINT `autoprocess_labels_testlabel_id_fk` FOREIGN KEY (`testlabel_id`) REFERENCES `tko_test_labels` (`id`)
    502 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    503 SET character_set_client = @saved_cs_client;
    504 
    505 --
    506 -- Table structure for table `planner_bugs`
    507 --
    508 
    509 DROP TABLE IF EXISTS `planner_bugs`;
    510 SET @saved_cs_client     = @@character_set_client;
    511 SET character_set_client = utf8;
    512 CREATE TABLE `planner_bugs` (
    513   `id` int(11) NOT NULL auto_increment,
    514   `external_uid` varchar(255) NOT NULL,
    515   PRIMARY KEY  (`id`),
    516   UNIQUE KEY `external_uid` (`external_uid`)
    517 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    518 SET character_set_client = @saved_cs_client;
    519 
    520 --
    521 -- Table structure for table `planner_custom_queries`
    522 --
    523 
    524 DROP TABLE IF EXISTS `planner_custom_queries`;
    525 SET @saved_cs_client     = @@character_set_client;
    526 SET character_set_client = utf8;
    527 CREATE TABLE `planner_custom_queries` (
    528   `id` int(11) NOT NULL auto_increment,
    529   `plan_id` int(11) NOT NULL,
    530   `query` longtext NOT NULL,
    531   PRIMARY KEY  (`id`),
    532   KEY `planner_custom_queries_plan_id` (`plan_id`),
    533   CONSTRAINT `custom_queries_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`)
    534 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    535 SET character_set_client = @saved_cs_client;
    536 
    537 --
    538 -- Table structure for table `planner_data_types`
    539 --
    540 
    541 DROP TABLE IF EXISTS `planner_data_types`;
    542 SET @saved_cs_client     = @@character_set_client;
    543 SET character_set_client = utf8;
    544 CREATE TABLE `planner_data_types` (
    545   `id` int(11) NOT NULL auto_increment,
    546   `name` varchar(255) NOT NULL,
    547   `db_table` varchar(255) NOT NULL,
    548   PRIMARY KEY  (`id`)
    549 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    550 SET character_set_client = @saved_cs_client;
    551 
    552 --
    553 -- Table structure for table `planner_history`
    554 --
    555 
    556 DROP TABLE IF EXISTS `planner_history`;
    557 SET @saved_cs_client     = @@character_set_client;
    558 SET character_set_client = utf8;
    559 CREATE TABLE `planner_history` (
    560   `id` int(11) NOT NULL auto_increment,
    561   `plan_id` int(11) NOT NULL,
    562   `action_id` int(11) NOT NULL,
    563   `user_id` int(11) NOT NULL,
    564   `data_type_id` int(11) NOT NULL,
    565   `object_id` int(11) NOT NULL,
    566   `old_object_repr` longtext NOT NULL,
    567   `new_object_repr` longtext NOT NULL,
    568   `time` datetime NOT NULL,
    569   PRIMARY KEY  (`id`),
    570   KEY `planner_history_plan_id` (`plan_id`),
    571   KEY `planner_history_user_id` (`user_id`),
    572   KEY `planner_history_data_type_id` (`data_type_id`),
    573   CONSTRAINT `history_data_type_id_fk` FOREIGN KEY (`data_type_id`) REFERENCES `planner_data_types` (`id`),
    574   CONSTRAINT `history_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`),
    575   CONSTRAINT `history_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `afe_users` (`id`)
    576 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    577 SET character_set_client = @saved_cs_client;
    578 
    579 --
    580 -- Table structure for table `planner_hosts`
    581 --
    582 
    583 DROP TABLE IF EXISTS `planner_hosts`;
    584 SET @saved_cs_client     = @@character_set_client;
    585 SET character_set_client = utf8;
    586 CREATE TABLE `planner_hosts` (
    587   `id` int(11) NOT NULL auto_increment,
    588   `plan_id` int(11) NOT NULL,
    589   `host_id` int(11) NOT NULL,
    590   `complete` tinyint(1) NOT NULL,
    591   `blocked` tinyint(1) NOT NULL,
    592   `added_by_label` tinyint(1) default '0',
    593   PRIMARY KEY  (`id`),
    594   KEY `planner_hosts_plan_id` (`plan_id`),
    595   KEY `planner_hosts_host_id` (`host_id`),
    596   CONSTRAINT `hosts_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `afe_hosts` (`id`),
    597   CONSTRAINT `hosts_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`)
    598 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    599 SET character_set_client = @saved_cs_client;
    600 
    601 --
    602 -- Table structure for table `planner_keyvals`
    603 --
    604 
    605 DROP TABLE IF EXISTS `planner_keyvals`;
    606 SET @saved_cs_client     = @@character_set_client;
    607 SET character_set_client = utf8;
    608 CREATE TABLE `planner_keyvals` (
    609   `id` int(11) NOT NULL auto_increment,
    610   `the_hash` varchar(40) NOT NULL,
    611   `key` varchar(1024) NOT NULL,
    612   `value` varchar(1024) NOT NULL,
    613   PRIMARY KEY  (`id`),
    614   UNIQUE KEY `the_hash` (`the_hash`)
    615 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    616 SET character_set_client = @saved_cs_client;
    617 
    618 --
    619 -- Table structure for table `planner_plan_host_labels`
    620 --
    621 
    622 DROP TABLE IF EXISTS `planner_plan_host_labels`;
    623 SET @saved_cs_client     = @@character_set_client;
    624 SET character_set_client = utf8;
    625 CREATE TABLE `planner_plan_host_labels` (
    626   `id` int(11) NOT NULL auto_increment,
    627   `plan_id` int(11) NOT NULL,
    628   `label_id` int(11) NOT NULL,
    629   PRIMARY KEY  (`id`),
    630   KEY `plan_host_labels_plan_id_fk` (`plan_id`),
    631   KEY `plan_host_labels_label_id_fk` (`label_id`),
    632   CONSTRAINT `plan_host_labels_label_id_fk` FOREIGN KEY (`label_id`) REFERENCES `afe_labels` (`id`),
    633   CONSTRAINT `plan_host_labels_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`)
    634 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    635 SET character_set_client = @saved_cs_client;
    636 
    637 --
    638 -- Table structure for table `planner_plan_owners`
    639 --
    640 
    641 DROP TABLE IF EXISTS `planner_plan_owners`;
    642 SET @saved_cs_client     = @@character_set_client;
    643 SET character_set_client = utf8;
    644 CREATE TABLE `planner_plan_owners` (
    645   `id` int(11) NOT NULL auto_increment,
    646   `plan_id` int(11) NOT NULL,
    647   `user_id` int(11) NOT NULL,
    648   PRIMARY KEY  (`id`),
    649   UNIQUE KEY `plan_id` (`plan_id`,`user_id`),
    650   KEY `plan_owners_user_id_fk` (`user_id`),
    651   CONSTRAINT `plan_owners_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`),
    652   CONSTRAINT `plan_owners_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `afe_users` (`id`)
    653 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    654 SET character_set_client = @saved_cs_client;
    655 
    656 --
    657 -- Table structure for table `planner_plans`
    658 --
    659 
    660 DROP TABLE IF EXISTS `planner_plans`;
    661 SET @saved_cs_client     = @@character_set_client;
    662 SET character_set_client = utf8;
    663 CREATE TABLE `planner_plans` (
    664   `id` int(11) NOT NULL auto_increment,
    665   `name` varchar(255) NOT NULL,
    666   `label_override` varchar(255) default NULL,
    667   `support` longtext NOT NULL,
    668   `complete` tinyint(1) NOT NULL,
    669   `dirty` tinyint(1) NOT NULL,
    670   `initialized` tinyint(1) default '0',
    671   PRIMARY KEY  (`id`),
    672   UNIQUE KEY `name` (`name`)
    673 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    674 SET character_set_client = @saved_cs_client;
    675 
    676 --
    677 -- Table structure for table `planner_saved_objects`
    678 --
    679 
    680 DROP TABLE IF EXISTS `planner_saved_objects`;
    681 SET @saved_cs_client     = @@character_set_client;
    682 SET character_set_client = utf8;
    683 CREATE TABLE `planner_saved_objects` (
    684   `id` int(11) NOT NULL auto_increment,
    685   `user_id` int(11) NOT NULL,
    686   `type` varchar(16) NOT NULL,
    687   `name` varchar(255) NOT NULL,
    688   `encoded_object` longtext NOT NULL,
    689   PRIMARY KEY  (`id`),
    690   UNIQUE KEY `user_id` (`user_id`,`type`,`name`),
    691   KEY `planner_saved_objects_user_id` (`user_id`),
    692   CONSTRAINT `saved_objects_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `afe_users` (`id`)
    693 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    694 SET character_set_client = @saved_cs_client;
    695 
    696 --
    697 -- Table structure for table `planner_test_configs`
    698 --
    699 
    700 DROP TABLE IF EXISTS `planner_test_configs`;
    701 SET @saved_cs_client     = @@character_set_client;
    702 SET character_set_client = utf8;
    703 CREATE TABLE `planner_test_configs` (
    704   `id` int(11) NOT NULL auto_increment,
    705   `plan_id` int(11) NOT NULL,
    706   `control_file_id` int(11) NOT NULL,
    707   `execution_order` int(11) NOT NULL,
    708   `alias` varchar(255) NOT NULL,
    709   `estimated_runtime` int(11) NOT NULL,
    710   `is_server` tinyint(1) default '1',
    711   PRIMARY KEY  (`id`),
    712   UNIQUE KEY `tests_plan_id_alias_unique` (`plan_id`,`alias`),
    713   KEY `planner_tests_plan_id` (`plan_id`),
    714   KEY `planner_tests_control_file_id` (`control_file_id`),
    715   CONSTRAINT `tests_control_file_id_fk` FOREIGN KEY (`control_file_id`) REFERENCES `planner_test_control_files` (`id`),
    716   CONSTRAINT `tests_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`)
    717 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    718 SET character_set_client = @saved_cs_client;
    719 
    720 --
    721 -- Table structure for table `planner_test_control_files`
    722 --
    723 
    724 DROP TABLE IF EXISTS `planner_test_control_files`;
    725 SET @saved_cs_client     = @@character_set_client;
    726 SET character_set_client = utf8;
    727 CREATE TABLE `planner_test_control_files` (
    728   `id` int(11) NOT NULL auto_increment,
    729   `the_hash` varchar(40) NOT NULL,
    730   `contents` longtext NOT NULL,
    731   PRIMARY KEY  (`id`),
    732   UNIQUE KEY `the_hash` (`the_hash`)
    733 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    734 SET character_set_client = @saved_cs_client;
    735 
    736 --
    737 -- Table structure for table `planner_test_jobs`
    738 --
    739 
    740 DROP TABLE IF EXISTS `planner_test_jobs`;
    741 SET @saved_cs_client     = @@character_set_client;
    742 SET character_set_client = utf8;
    743 CREATE TABLE `planner_test_jobs` (
    744   `id` int(11) NOT NULL auto_increment,
    745   `plan_id` int(11) NOT NULL,
    746   `test_config_id` int(11) NOT NULL,
    747   `afe_job_id` int(11) NOT NULL,
    748   PRIMARY KEY  (`id`),
    749   KEY `planner_test_jobs_plan_id` (`plan_id`),
    750   KEY `planner_test_jobs_afe_job_id` (`afe_job_id`),
    751   KEY `planner_test_jobs_test_config_id` (`test_config_id`),
    752   CONSTRAINT `test_jobs_afe_job_id_fk` FOREIGN KEY (`afe_job_id`) REFERENCES `afe_jobs` (`id`),
    753   CONSTRAINT `test_jobs_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`),
    754   CONSTRAINT `test_jobs_test_config_id_fk` FOREIGN KEY (`test_config_id`) REFERENCES `planner_test_configs` (`id`)
    755 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    756 SET character_set_client = @saved_cs_client;
    757 
    758 --
    759 -- Table structure for table `planner_test_run_bugs`
    760 --
    761 
    762 DROP TABLE IF EXISTS `planner_test_run_bugs`;
    763 SET @saved_cs_client     = @@character_set_client;
    764 SET character_set_client = utf8;
    765 CREATE TABLE `planner_test_run_bugs` (
    766   `id` int(11) NOT NULL auto_increment,
    767   `testrun_id` int(11) NOT NULL,
    768   `bug_id` int(11) NOT NULL,
    769   PRIMARY KEY  (`id`),
    770   UNIQUE KEY `testrun_id` (`testrun_id`,`bug_id`),
    771   KEY `test_run_bugs_bug_id_fk` (`bug_id`),
    772   CONSTRAINT `test_run_bugs_bug_id_fk` FOREIGN KEY (`bug_id`) REFERENCES `planner_bugs` (`id`),
    773   CONSTRAINT `test_run_bugs_testrun_id_fk` FOREIGN KEY (`testrun_id`) REFERENCES `planner_test_runs` (`id`)
    774 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    775 SET character_set_client = @saved_cs_client;
    776 
    777 --
    778 -- Table structure for table `planner_test_runs`
    779 --
    780 
    781 DROP TABLE IF EXISTS `planner_test_runs`;
    782 SET @saved_cs_client     = @@character_set_client;
    783 SET character_set_client = utf8;
    784 CREATE TABLE `planner_test_runs` (
    785   `id` int(11) NOT NULL auto_increment,
    786   `plan_id` int(11) NOT NULL,
    787   `test_job_id` int(11) NOT NULL,
    788   `tko_test_id` int(10) unsigned NOT NULL,
    789   `status` varchar(16) NOT NULL,
    790   `finalized` tinyint(1) NOT NULL,
    791   `seen` tinyint(1) NOT NULL,
    792   `triaged` tinyint(1) NOT NULL,
    793   `host_id` int(11) NOT NULL,
    794   PRIMARY KEY  (`id`),
    795   UNIQUE KEY `test_runs_unique` (`plan_id`,`test_job_id`,`tko_test_id`,`host_id`),
    796   KEY `planner_test_runs_plan_id` (`plan_id`),
    797   KEY `planner_test_runs_test_job_id` (`test_job_id`),
    798   KEY `planner_test_runs_tko_test_id` (`tko_test_id`),
    799   KEY `test_runs_host_id_fk` (`host_id`),
    800   CONSTRAINT `test_runs_host_id_fk` FOREIGN KEY (`host_id`) REFERENCES `planner_hosts` (`id`),
    801   CONSTRAINT `test_runs_plan_id_fk` FOREIGN KEY (`plan_id`) REFERENCES `planner_plans` (`id`),
    802   CONSTRAINT `test_runs_test_job_id_fk` FOREIGN KEY (`test_job_id`) REFERENCES `planner_test_jobs` (`id`),
    803   CONSTRAINT `test_runs_tko_test_id_fk` FOREIGN KEY (`tko_test_id`) REFERENCES `tko_tests` (`test_idx`)
    804 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    805 SET character_set_client = @saved_cs_client;
    806 
    807 --
    808 -- Table structure for table `tko_embedded_graphing_queries`
    809 --
    810 
    811 DROP TABLE IF EXISTS `tko_embedded_graphing_queries`;
    812 SET @saved_cs_client     = @@character_set_client;
    813 SET character_set_client = utf8;
    814 CREATE TABLE `tko_embedded_graphing_queries` (
    815   `id` int(11) NOT NULL auto_increment,
    816   `url_token` text NOT NULL,
    817   `graph_type` varchar(16) NOT NULL,
    818   `params` text NOT NULL,
    819   `last_updated` datetime NOT NULL,
    820   `refresh_time` datetime default NULL,
    821   `cached_png` mediumblob,
    822   PRIMARY KEY  (`id`),
    823   KEY `url_token` (`url_token`(128))
    824 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    825 SET character_set_client = @saved_cs_client;
    826 
    827 --
    828 -- Table structure for table `tko_iteration_attributes`
    829 --
    830 
    831 DROP TABLE IF EXISTS `tko_iteration_attributes`;
    832 SET @saved_cs_client     = @@character_set_client;
    833 SET character_set_client = utf8;
    834 CREATE TABLE `tko_iteration_attributes` (
    835   `test_idx` int(10) unsigned NOT NULL,
    836   `iteration` int(11) default NULL,
    837   `attribute` varchar(30) default NULL,
    838   `value` varchar(1024) default NULL,
    839   KEY `test_idx` (`test_idx`),
    840   CONSTRAINT `tko_iteration_attributes_ibfk_1` FOREIGN KEY (`test_idx`) REFERENCES `tko_tests` (`test_idx`) ON DELETE CASCADE
    841 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    842 SET character_set_client = @saved_cs_client;
    843 
    844 --
    845 -- Table structure for table `tko_iteration_result`
    846 --
    847 
    848 DROP TABLE IF EXISTS `tko_iteration_result`;
    849 SET @saved_cs_client     = @@character_set_client;
    850 SET character_set_client = utf8;
    851 CREATE TABLE `tko_iteration_result` (
    852   `test_idx` int(10) unsigned NOT NULL,
    853   `iteration` int(11) default NULL,
    854   `attribute` varchar(30) default NULL,
    855   `value` float default NULL,
    856   KEY `test_idx` (`test_idx`),
    857   KEY `attribute` (`attribute`),
    858   KEY `value` (`value`),
    859   CONSTRAINT `tko_iteration_result_ibfk_1` FOREIGN KEY (`test_idx`) REFERENCES `tko_tests` (`test_idx`) ON DELETE CASCADE
    860 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    861 SET character_set_client = @saved_cs_client;
    862 
    863 --
    864 -- Table structure for table `tko_job_keyvals`
    865 --
    866 
    867 DROP TABLE IF EXISTS `tko_job_keyvals`;
    868 SET @saved_cs_client     = @@character_set_client;
    869 SET character_set_client = utf8;
    870 CREATE TABLE `tko_job_keyvals` (
    871   `id` int(11) NOT NULL auto_increment,
    872   `job_id` int(10) unsigned NOT NULL,
    873   `key` varchar(90) NOT NULL,
    874   `value` varchar(300) NOT NULL,
    875   PRIMARY KEY  (`id`),
    876   KEY `tko_job_keyvals_job_id` (`job_id`),
    877   KEY `tko_job_keyvals_key` (`key`),
    878   CONSTRAINT `tko_job_keyvals_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `tko_jobs` (`job_idx`) ON DELETE NO ACTION
    879 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    880 SET character_set_client = @saved_cs_client;
    881 
    882 --
    883 -- Table structure for table `tko_jobs`
    884 --
    885 
    886 DROP TABLE IF EXISTS `tko_jobs`;
    887 SET @saved_cs_client     = @@character_set_client;
    888 SET character_set_client = utf8;
    889 CREATE TABLE `tko_jobs` (
    890   `job_idx` int(10) unsigned NOT NULL auto_increment,
    891   `tag` varchar(100) default NULL,
    892   `label` varchar(100) default NULL,
    893   `username` varchar(80) default NULL,
    894   `machine_idx` int(10) unsigned NOT NULL,
    895   `queued_time` datetime default NULL,
    896   `started_time` datetime default NULL,
    897   `finished_time` datetime default NULL,
    898   `afe_job_id` int(11) default NULL,
    899   PRIMARY KEY  (`job_idx`),
    900   UNIQUE KEY `tag` (`tag`),
    901   KEY `label` (`label`),
    902   KEY `username` (`username`),
    903   KEY `machine_idx` (`machine_idx`),
    904   KEY `afe_job_id` (`afe_job_id`),
    905   CONSTRAINT `tko_jobs_ibfk_1` FOREIGN KEY (`machine_idx`) REFERENCES `tko_machines` (`machine_idx`) ON DELETE CASCADE
    906 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    907 SET character_set_client = @saved_cs_client;
    908 
    909 --
    910 -- Table structure for table `tko_kernels`
    911 --
    912 
    913 DROP TABLE IF EXISTS `tko_kernels`;
    914 SET @saved_cs_client     = @@character_set_client;
    915 SET character_set_client = utf8;
    916 CREATE TABLE `tko_kernels` (
    917   `kernel_idx` int(10) unsigned NOT NULL auto_increment,
    918   `kernel_hash` varchar(35) default NULL,
    919   `base` varchar(30) default NULL,
    920   `printable` varchar(100) default NULL,
    921   PRIMARY KEY  (`kernel_idx`),
    922   KEY `printable` (`printable`)
    923 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    924 SET character_set_client = @saved_cs_client;
    925 
    926 --
    927 -- Table structure for table `tko_machines`
    928 --
    929 
    930 DROP TABLE IF EXISTS `tko_machines`;
    931 SET @saved_cs_client     = @@character_set_client;
    932 SET character_set_client = utf8;
    933 CREATE TABLE `tko_machines` (
    934   `machine_idx` int(10) unsigned NOT NULL auto_increment,
    935   `hostname` varchar(700) default NULL,
    936   `machine_group` varchar(80) default NULL,
    937   `owner` varchar(80) default NULL,
    938   PRIMARY KEY  (`machine_idx`),
    939   UNIQUE KEY `hostname` (`hostname`)
    940 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    941 SET character_set_client = @saved_cs_client;
    942 
    943 --
    944 -- Table structure for table `tko_patches`
    945 --
    946 
    947 DROP TABLE IF EXISTS `tko_patches`;
    948 SET @saved_cs_client     = @@character_set_client;
    949 SET character_set_client = utf8;
    950 CREATE TABLE `tko_patches` (
    951   `kernel_idx` int(10) unsigned NOT NULL,
    952   `name` varchar(80) default NULL,
    953   `url` varchar(300) default NULL,
    954   `hash` varchar(35) default NULL,
    955   KEY `kernel_idx` (`kernel_idx`),
    956   CONSTRAINT `tko_patches_ibfk_1` FOREIGN KEY (`kernel_idx`) REFERENCES `tko_kernels` (`kernel_idx`) ON DELETE CASCADE
    957 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    958 SET character_set_client = @saved_cs_client;
    959 
    960 --
    961 -- Temporary table structure for view `tko_perf_view`
    962 --
    963 
    964 DROP TABLE IF EXISTS `tko_perf_view`;
    965 /*!50001 DROP VIEW IF EXISTS `tko_perf_view`*/;
    966 /*!50001 CREATE TABLE `tko_perf_view` (
    967   `test_idx` int(10) unsigned,
    968   `job_idx` int(10) unsigned,
    969   `test` varchar(60),
    970   `subdir` varchar(60),
    971   `kernel_idx` int(10) unsigned,
    972   `status` int(10) unsigned,
    973   `reason` varchar(1024),
    974   `machine_idx` int(10) unsigned,
    975   `test_started_time` datetime,
    976   `test_finished_time` datetime,
    977   `job_tag` varchar(100),
    978   `job_label` varchar(100),
    979   `job_username` varchar(80),
    980   `job_queued_time` datetime,
    981   `job_started_time` datetime,
    982   `job_finished_time` datetime,
    983   `machine_hostname` varchar(700),
    984   `machine_group` varchar(80),
    985   `machine_owner` varchar(80),
    986   `kernel_hash` varchar(35),
    987   `kernel_base` varchar(30),
    988   `kernel_printable` varchar(100),
    989   `status_word` varchar(10),
    990   `iteration` int(11),
    991   `iteration_key` varchar(30),
    992   `iteration_value` float
    993 ) */;
    994 
    995 --
    996 -- Temporary table structure for view `tko_perf_view_2`
    997 --
    998 
    999 DROP TABLE IF EXISTS `tko_perf_view_2`;
   1000 /*!50001 DROP VIEW IF EXISTS `tko_perf_view_2`*/;
   1001 /*!50001 CREATE TABLE `tko_perf_view_2` (
   1002   `test_idx` int(10) unsigned,
   1003   `job_idx` int(10) unsigned,
   1004   `test_name` varchar(60),
   1005   `subdir` varchar(60),
   1006   `kernel_idx` int(10) unsigned,
   1007   `status_idx` int(10) unsigned,
   1008   `reason` varchar(1024),
   1009   `machine_idx` int(10) unsigned,
   1010   `test_started_time` datetime,
   1011   `test_finished_time` datetime,
   1012   `job_tag` varchar(100),
   1013   `job_name` varchar(100),
   1014   `job_owner` varchar(80),
   1015   `job_queued_time` datetime,
   1016   `job_started_time` datetime,
   1017   `job_finished_time` datetime,
   1018   `hostname` varchar(700),
   1019   `platform` varchar(80),
   1020   `machine_owner` varchar(80),
   1021   `kernel_hash` varchar(35),
   1022   `kernel_base` varchar(30),
   1023   `kernel` varchar(100),
   1024   `status` varchar(10),
   1025   `iteration` int(11),
   1026   `iteration_key` varchar(30),
   1027   `iteration_value` float
   1028 ) */;
   1029 
   1030 --
   1031 -- Table structure for table `tko_query_history`
   1032 --
   1033 
   1034 DROP TABLE IF EXISTS `tko_query_history`;
   1035 SET @saved_cs_client     = @@character_set_client;
   1036 SET character_set_client = utf8;
   1037 CREATE TABLE `tko_query_history` (
   1038   `uid` varchar(32) default NULL,
   1039   `time_created` varchar(32) default NULL,
   1040   `user_comment` varchar(256) default NULL,
   1041   `url` varchar(1000) default NULL
   1042 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1043 SET character_set_client = @saved_cs_client;
   1044 
   1045 --
   1046 -- Table structure for table `tko_saved_queries`
   1047 --
   1048 
   1049 DROP TABLE IF EXISTS `tko_saved_queries`;
   1050 SET @saved_cs_client     = @@character_set_client;
   1051 SET character_set_client = utf8;
   1052 CREATE TABLE `tko_saved_queries` (
   1053   `id` int(11) NOT NULL auto_increment,
   1054   `owner` varchar(80) NOT NULL,
   1055   `name` varchar(100) NOT NULL,
   1056   `url_token` longtext NOT NULL,
   1057   PRIMARY KEY  (`id`)
   1058 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1059 SET character_set_client = @saved_cs_client;
   1060 
   1061 --
   1062 -- Table structure for table `tko_status`
   1063 --
   1064 
   1065 DROP TABLE IF EXISTS `tko_status`;
   1066 SET @saved_cs_client     = @@character_set_client;
   1067 SET character_set_client = utf8;
   1068 CREATE TABLE `tko_status` (
   1069   `status_idx` int(10) unsigned NOT NULL auto_increment,
   1070   `word` varchar(10) default NULL,
   1071   PRIMARY KEY  (`status_idx`),
   1072   KEY `word` (`word`)
   1073 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1074 SET character_set_client = @saved_cs_client;
   1075 
   1076 --
   1077 -- Dumping data for table `tko_status`
   1078 --
   1079 
   1080 LOCK TABLES `tko_status` WRITE;
   1081 /*!40000 ALTER TABLE `tko_status` DISABLE KEYS */;
   1082 INSERT INTO `tko_status` (word) VALUES ('ABORT'),('ALERT'),('ERROR'),('FAIL'),('GOOD'),('NOSTATUS'),('RUNNING'),('TEST_NA'),('WARN');
   1083 /*!40000 ALTER TABLE `tko_status` ENABLE KEYS */;
   1084 UNLOCK TABLES;
   1085 
   1086 
   1087 --
   1088 -- Table structure for table `tko_test_attributes`
   1089 --
   1090 
   1091 DROP TABLE IF EXISTS `tko_test_attributes`;
   1092 SET @saved_cs_client     = @@character_set_client;
   1093 SET character_set_client = utf8;
   1094 CREATE TABLE `tko_test_attributes` (
   1095   `test_idx` int(10) unsigned NOT NULL,
   1096   `attribute` varchar(30) default NULL,
   1097   `value` varchar(1024) default NULL,
   1098   `id` int(11) NOT NULL auto_increment,
   1099   `user_created` tinyint(1) NOT NULL default '0',
   1100   PRIMARY KEY  (`id`),
   1101   KEY `test_idx` (`test_idx`),
   1102   KEY `attribute` (`attribute`),
   1103   KEY `value` (`value`(767)),
   1104   CONSTRAINT `tko_test_attributes_ibfk_1` FOREIGN KEY (`test_idx`) REFERENCES `tko_tests` (`test_idx`) ON DELETE CASCADE
   1105 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1106 SET character_set_client = @saved_cs_client;
   1107 
   1108 --
   1109 -- Table structure for table `tko_test_labels`
   1110 --
   1111 
   1112 DROP TABLE IF EXISTS `tko_test_labels`;
   1113 SET @saved_cs_client     = @@character_set_client;
   1114 SET character_set_client = utf8;
   1115 CREATE TABLE `tko_test_labels` (
   1116   `id` int(11) NOT NULL auto_increment,
   1117   `name` varchar(80) NOT NULL,
   1118   `description` longtext NOT NULL,
   1119   PRIMARY KEY  (`id`)
   1120 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1121 SET character_set_client = @saved_cs_client;
   1122 
   1123 --
   1124 -- Table structure for table `tko_test_labels_tests`
   1125 --
   1126 
   1127 DROP TABLE IF EXISTS `tko_test_labels_tests`;
   1128 SET @saved_cs_client     = @@character_set_client;
   1129 SET character_set_client = utf8;
   1130 CREATE TABLE `tko_test_labels_tests` (
   1131   `id` int(11) NOT NULL auto_increment,
   1132   `testlabel_id` int(11) NOT NULL,
   1133   `test_id` int(10) unsigned NOT NULL,
   1134   PRIMARY KEY  (`id`),
   1135   UNIQUE KEY `testlabel_id` (`testlabel_id`,`test_id`),
   1136   KEY `test_labels_tests_test_id` (`test_id`),
   1137   CONSTRAINT `tests_labels_tests_ibfk_1` FOREIGN KEY (`testlabel_id`) REFERENCES `tko_test_labels` (`id`),
   1138   CONSTRAINT `tests_labels_tests_ibfk_2` FOREIGN KEY (`test_id`) REFERENCES `tko_tests` (`test_idx`)
   1139 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1140 SET character_set_client = @saved_cs_client;
   1141 
   1142 --
   1143 -- Temporary table structure for view `tko_test_view`
   1144 --
   1145 
   1146 DROP TABLE IF EXISTS `tko_test_view`;
   1147 /*!50001 DROP VIEW IF EXISTS `tko_test_view`*/;
   1148 /*!50001 CREATE TABLE `tko_test_view` (
   1149   `test_idx` int(10) unsigned,
   1150   `job_idx` int(10) unsigned,
   1151   `test` varchar(60),
   1152   `subdir` varchar(60),
   1153   `kernel_idx` int(10) unsigned,
   1154   `status` int(10) unsigned,
   1155   `reason` varchar(1024),
   1156   `machine_idx` int(10) unsigned,
   1157   `test_started_time` datetime,
   1158   `test_finished_time` datetime,
   1159   `job_tag` varchar(100),
   1160   `job_label` varchar(100),
   1161   `job_username` varchar(80),
   1162   `job_queued_time` datetime,
   1163   `job_started_time` datetime,
   1164   `job_finished_time` datetime,
   1165   `machine_hostname` varchar(700),
   1166   `machine_group` varchar(80),
   1167   `machine_owner` varchar(80),
   1168   `kernel_hash` varchar(35),
   1169   `kernel_base` varchar(30),
   1170   `kernel_printable` varchar(100),
   1171   `status_word` varchar(10)
   1172 ) */;
   1173 
   1174 --
   1175 -- Temporary table structure for view `tko_test_view_2`
   1176 --
   1177 
   1178 DROP TABLE IF EXISTS `tko_test_view_2`;
   1179 /*!50001 DROP VIEW IF EXISTS `tko_test_view_2`*/;
   1180 /*!50001 CREATE TABLE `tko_test_view_2` (
   1181   `test_idx` int(10) unsigned,
   1182   `job_idx` int(10) unsigned,
   1183   `test_name` varchar(60),
   1184   `subdir` varchar(60),
   1185   `kernel_idx` int(10) unsigned,
   1186   `status_idx` int(10) unsigned,
   1187   `reason` varchar(1024),
   1188   `machine_idx` int(10) unsigned,
   1189   `test_started_time` datetime,
   1190   `test_finished_time` datetime,
   1191   `job_tag` varchar(100),
   1192   `job_name` varchar(100),
   1193   `job_owner` varchar(80),
   1194   `job_queued_time` datetime,
   1195   `job_started_time` datetime,
   1196   `job_finished_time` datetime,
   1197   `afe_job_id` int(11),
   1198   `hostname` varchar(700),
   1199   `platform` varchar(80),
   1200   `machine_owner` varchar(80),
   1201   `kernel_hash` varchar(35),
   1202   `kernel_base` varchar(30),
   1203   `kernel` varchar(100),
   1204   `status` varchar(10)
   1205 ) */;
   1206 
   1207 --
   1208 -- Temporary table structure for view `tko_test_view_outer_joins`
   1209 --
   1210 
   1211 DROP TABLE IF EXISTS `tko_test_view_outer_joins`;
   1212 /*!50001 DROP VIEW IF EXISTS `tko_test_view_outer_joins`*/;
   1213 /*!50001 CREATE TABLE `tko_test_view_outer_joins` (
   1214   `test_idx` int(10) unsigned,
   1215   `job_idx` int(10) unsigned,
   1216   `test_name` varchar(60),
   1217   `subdir` varchar(60),
   1218   `kernel_idx` int(10) unsigned,
   1219   `status_idx` int(10) unsigned,
   1220   `reason` varchar(1024),
   1221   `machine_idx` int(10) unsigned,
   1222   `test_started_time` datetime,
   1223   `test_finished_time` datetime,
   1224   `job_tag` varchar(100),
   1225   `job_name` varchar(100),
   1226   `job_owner` varchar(80),
   1227   `job_queued_time` datetime,
   1228   `job_started_time` datetime,
   1229   `job_finished_time` datetime,
   1230   `hostname` varchar(700),
   1231   `platform` varchar(80),
   1232   `machine_owner` varchar(80),
   1233   `kernel_hash` varchar(35),
   1234   `kernel_base` varchar(30),
   1235   `kernel` varchar(100),
   1236   `status` varchar(10)
   1237 ) */;
   1238 
   1239 --
   1240 -- Table structure for table `tko_tests`
   1241 --
   1242 
   1243 DROP TABLE IF EXISTS `tko_tests`;
   1244 SET @saved_cs_client     = @@character_set_client;
   1245 SET character_set_client = utf8;
   1246 CREATE TABLE `tko_tests` (
   1247   `test_idx` int(10) unsigned NOT NULL auto_increment,
   1248   `job_idx` int(10) unsigned NOT NULL,
   1249   `test` varchar(60) default NULL,
   1250   `subdir` varchar(60) default NULL,
   1251   `kernel_idx` int(10) unsigned NOT NULL,
   1252   `status` int(10) unsigned NOT NULL,
   1253   `reason` varchar(1024) default NULL,
   1254   `machine_idx` int(10) unsigned NOT NULL,
   1255   `invalid` tinyint(1) default '0',
   1256   `finished_time` datetime default NULL,
   1257   `started_time` datetime default NULL,
   1258   PRIMARY KEY  (`test_idx`),
   1259   KEY `kernel_idx` (`kernel_idx`),
   1260   KEY `status` (`status`),
   1261   KEY `machine_idx` (`machine_idx`),
   1262   KEY `job_idx` (`job_idx`),
   1263   KEY `reason` (`reason`(767)),
   1264   KEY `test` (`test`),
   1265   KEY `subdir` (`subdir`),
   1266   CONSTRAINT `tests_to_jobs_ibfk` FOREIGN KEY (`job_idx`) REFERENCES `tko_jobs` (`job_idx`),
   1267   CONSTRAINT `tko_tests_ibfk_1` FOREIGN KEY (`kernel_idx`) REFERENCES `tko_kernels` (`kernel_idx`) ON DELETE CASCADE,
   1268   CONSTRAINT `tko_tests_ibfk_2` FOREIGN KEY (`status`) REFERENCES `tko_status` (`status_idx`) ON DELETE CASCADE,
   1269   CONSTRAINT `tko_tests_ibfk_3` FOREIGN KEY (`machine_idx`) REFERENCES `tko_machines` (`machine_idx`) ON DELETE CASCADE
   1270 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
   1271 SET character_set_client = @saved_cs_client;
   1272 
   1273 --
   1274 -- Final view structure for view `tko_perf_view`
   1275 --
   1276 
   1277 /*!50001 DROP TABLE `tko_perf_view`*/;
   1278 /*!50001 DROP VIEW IF EXISTS `tko_perf_view`*/;
   1279 /*!50001 CREATE ALGORITHM=UNDEFINED */
   1280 /*!50013 DEFINER=CURRENT_USER SQL SECURITY DEFINER */
   1281 /*!50001 VIEW `tko_perf_view` AS select `tko_tests`.`test_idx` AS `test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS `test`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS `kernel_idx`,`tko_tests`.`status` AS `status`,`tko_tests`.`reason` AS `reason`,`tko_tests`.`machine_idx` AS `machine_idx`,`tko_tests`.`started_time` AS `test_started_time`,`tko_tests`.`finished_time` AS `test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label` AS `job_label`,`tko_jobs`.`username` AS `job_username`,`tko_jobs`.`queued_time` AS `job_queued_time`,`tko_jobs`.`started_time` AS `job_started_time`,`tko_jobs`.`finished_time` AS `job_finished_time`,`tko_machines`.`hostname` AS `machine_hostname`,`tko_machines`.`machine_group` AS `machine_group`,`tko_machines`.`owner` AS `machine_owner`,`tko_kernels`.`kernel_hash` AS `kernel_hash`,`tko_kernels`.`base` AS `kernel_base`,`tko_kernels`.`printable` AS `kernel_printable`,`tko_status`.`word` AS `status_word`,`tko_iteration_result`.`iteration` AS `iteration`,`tko_iteration_result`.`attribute` AS `iteration_key`,`tko_iteration_result`.`value` AS `iteration_value` from (((((`tko_tests` join `tko_jobs` on((`tko_jobs`.`job_idx` = `tko_tests`.`job_idx`))) join `tko_machines` on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) join `tko_kernels` on((`tko_kernels`.`kernel_idx` = `tko_tests`.`kernel_idx`))) join `tko_status` on((`tko_status`.`status_idx` = `tko_tests`.`status`))) join `tko_iteration_result` on((`tko_iteration_result`.`test_idx` = `tko_tests`.`test_idx`))) */;
   1282 
   1283 --
   1284 -- Final view structure for view `tko_perf_view_2`
   1285 --
   1286 
   1287 /*!50001 DROP TABLE `tko_perf_view_2`*/;
   1288 /*!50001 DROP VIEW IF EXISTS `tko_perf_view_2`*/;
   1289 /*!50001 CREATE ALGORITHM=UNDEFINED */
   1290 /*!50013 DEFINER=CURRENT_USER SQL SECURITY DEFINER */
   1291 /*!50001 VIEW `tko_perf_view_2` AS select `tko_tests`.`test_idx` AS `test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS `test_name`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS `kernel_idx`,`tko_tests`.`status` AS `status_idx`,`tko_tests`.`reason` AS `reason`,`tko_tests`.`machine_idx` AS `machine_idx`,`tko_tests`.`started_time` AS `test_started_time`,`tko_tests`.`finished_time` AS `test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label` AS `job_name`,`tko_jobs`.`username` AS `job_owner`,`tko_jobs`.`queued_time` AS `job_queued_time`,`tko_jobs`.`started_time` AS `job_started_time`,`tko_jobs`.`finished_time` AS `job_finished_time`,`tko_machines`.`hostname` AS `hostname`,`tko_machines`.`machine_group` AS `platform`,`tko_machines`.`owner` AS `machine_owner`,`tko_kernels`.`kernel_hash` AS `kernel_hash`,`tko_kernels`.`base` AS `kernel_base`,`tko_kernels`.`printable` AS `kernel`,`tko_status`.`word` AS `status`,`tko_iteration_result`.`iteration` AS `iteration`,`tko_iteration_result`.`attribute` AS `iteration_key`,`tko_iteration_result`.`value` AS `iteration_value` from (((((`tko_tests` left join `tko_jobs` on((`tko_jobs`.`job_idx` = `tko_tests`.`job_idx`))) left join `tko_machines` on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) left join `tko_kernels` on((`tko_kernels`.`kernel_idx` = `tko_tests`.`kernel_idx`))) left join `tko_status` on((`tko_status`.`status_idx` = `tko_tests`.`status`))) left join `tko_iteration_result` on((`tko_iteration_result`.`test_idx` = `tko_tests`.`test_idx`))) */;
   1292 
   1293 --
   1294 -- Final view structure for view `tko_test_view`
   1295 --
   1296 
   1297 /*!50001 DROP TABLE `tko_test_view`*/;
   1298 /*!50001 DROP VIEW IF EXISTS `tko_test_view`*/;
   1299 /*!50001 CREATE ALGORITHM=UNDEFINED */
   1300 /*!50013 DEFINER=CURRENT_USER SQL SECURITY DEFINER */
   1301 /*!50001 VIEW `tko_test_view` AS select `tko_tests`.`test_idx` AS `test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS `test`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS `kernel_idx`,`tko_tests`.`status` AS `status`,`tko_tests`.`reason` AS `reason`,`tko_tests`.`machine_idx` AS `machine_idx`,`tko_tests`.`started_time` AS `test_started_time`,`tko_tests`.`finished_time` AS `test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label` AS `job_label`,`tko_jobs`.`username` AS `job_username`,`tko_jobs`.`queued_time` AS `job_queued_time`,`tko_jobs`.`started_time` AS `job_started_time`,`tko_jobs`.`finished_time` AS `job_finished_time`,`tko_machines`.`hostname` AS `machine_hostname`,`tko_machines`.`machine_group` AS `machine_group`,`tko_machines`.`owner` AS `machine_owner`,`tko_kernels`.`kernel_hash` AS `kernel_hash`,`tko_kernels`.`base` AS `kernel_base`,`tko_kernels`.`printable` AS `kernel_printable`,`tko_status`.`word` AS `status_word` from ((((`tko_tests` join `tko_jobs` on((`tko_jobs`.`job_idx` = `tko_tests`.`job_idx`))) join `tko_machines` on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) join `tko_kernels` on((`tko_kernels`.`kernel_idx` = `tko_tests`.`kernel_idx`))) join `tko_status` on((`tko_status`.`status_idx` = `tko_tests`.`status`))) */;
   1302 
   1303 --
   1304 -- Final view structure for view `tko_test_view_2`
   1305 --
   1306 
   1307 /*!50001 DROP TABLE `tko_test_view_2`*/;
   1308 /*!50001 DROP VIEW IF EXISTS `tko_test_view_2`*/;
   1309 /*!50001 CREATE ALGORITHM=UNDEFINED */
   1310 /*!50013 DEFINER=CURRENT_USER SQL SECURITY DEFINER */
   1311 /*!50001 VIEW `tko_test_view_2` AS select `tko_tests`.`test_idx` AS `test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS `test_name`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS `kernel_idx`,`tko_tests`.`status` AS `status_idx`,`tko_tests`.`reason` AS `reason`,`tko_tests`.`machine_idx` AS `machine_idx`,`tko_tests`.`started_time` AS `test_started_time`,`tko_tests`.`finished_time` AS `test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label` AS `job_name`,`tko_jobs`.`username` AS `job_owner`,`tko_jobs`.`queued_time` AS `job_queued_time`,`tko_jobs`.`started_time` AS `job_started_time`,`tko_jobs`.`finished_time` AS `job_finished_time`,`tko_jobs`.`afe_job_id` AS `afe_job_id`,`tko_machines`.`hostname` AS `hostname`,`tko_machines`.`machine_group` AS `platform`,`tko_machines`.`owner` AS `machine_owner`,`tko_kernels`.`kernel_hash` AS `kernel_hash`,`tko_kernels`.`base` AS `kernel_base`,`tko_kernels`.`printable` AS `kernel`,`tko_status`.`word` AS `status` from ((((`tko_tests` join `tko_jobs` on((`tko_jobs`.`job_idx` = `tko_tests`.`job_idx`))) join `tko_machines` on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) join `tko_kernels` on((`tko_kernels`.`kernel_idx` = `tko_tests`.`kernel_idx`))) join `tko_status` on((`tko_status`.`status_idx` = `tko_tests`.`status`))) */;
   1312 
   1313 --
   1314 -- Final view structure for view `tko_test_view_outer_joins`
   1315 --
   1316 
   1317 /*!50001 DROP TABLE `tko_test_view_outer_joins`*/;
   1318 /*!50001 DROP VIEW IF EXISTS `tko_test_view_outer_joins`*/;
   1319 /*!50001 CREATE ALGORITHM=UNDEFINED */
   1320 /*!50013 DEFINER=CURRENT_USER SQL SECURITY DEFINER */
   1321 /*!50001 VIEW `tko_test_view_outer_joins` AS select `tko_tests`.`test_idx` AS `test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS `test_name`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS `kernel_idx`,`tko_tests`.`status` AS `status_idx`,`tko_tests`.`reason` AS `reason`,`tko_tests`.`machine_idx` AS `machine_idx`,`tko_tests`.`started_time` AS `test_started_time`,`tko_tests`.`finished_time` AS `test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label` AS `job_name`,`tko_jobs`.`username` AS `job_owner`,`tko_jobs`.`queued_time` AS `job_queued_time`,`tko_jobs`.`started_time` AS `job_started_time`,`tko_jobs`.`finished_time` AS `job_finished_time`,`tko_machines`.`hostname` AS `hostname`,`tko_machines`.`machine_group` AS `platform`,`tko_machines`.`owner` AS `machine_owner`,`tko_kernels`.`kernel_hash` AS `kernel_hash`,`tko_kernels`.`base` AS `kernel_base`,`tko_kernels`.`printable` AS `kernel`,`tko_status`.`word` AS `status` from ((((`tko_tests` left join `tko_jobs` on((`tko_jobs`.`job_idx` = `tko_tests`.`job_idx`))) left join `tko_machines` on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) left join `tko_kernels` on((`tko_kernels`.`kernel_idx` = `tko_tests`.`kernel_idx`))) left join `tko_status` on((`tko_status`.`status_idx` = `tko_tests`.`status`))) */;
   1322 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
   1323 
   1324 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
   1325 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
   1326 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
   1327 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
   1328 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
   1329 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
   1330 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
   1331 
   1332 -- Dump completed on 2010-03-09 21:20:11
   1333