Project

General

Profile

foreman_0.1.5-0.4.0_tables.diff

Ky Zh, 03/26/2012 08:56 AM

View differences:

foreman_0.4.0_tables.sql Mon Mar 26 13:26:48 2012
69 69
  `action` varchar(255) default NULL,
70 70
  `changes` text,
71 71
  `version` int(11) default '0',
72
  `comment` varchar(255) default NULL,
73
  `auditable_parent_id` int(11) default NULL,
74
  `auditable_parent_type` varchar(255) default NULL,
72 75
  `created_at` datetime default NULL,
73 76
  PRIMARY KEY  (`id`),
74 77
  KEY `auditable_index` (`auditable_id`,`auditable_type`),
75 78
  KEY `user_index` (`user_id`,`user_type`),
76
  KEY `index_audits_on_created_at` (`created_at`)
77
) ENGINE=InnoDB AUTO_INCREMENT=639 DEFAULT CHARSET=latin1;
79
  KEY `index_audits_on_created_at` (`created_at`),
80
  KEY `auditable_parent_index` (`auditable_parent_id`,`auditable_parent_type`)
81
) ENGINE=InnoDB AUTO_INCREMENT=644 DEFAULT CHARSET=latin1;
78 82
SET character_set_client = @saved_cs_client;
79 83

  
80 84
--
......
102 106
  `created_at` datetime default NULL,
103 107
  `updated_at` datetime default NULL,
104 108
  PRIMARY KEY  (`id`)
105
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
109
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
110
SET character_set_client = @saved_cs_client;
111

  
112
--
113
-- Table structure for table `bookmarks`
114
--
115

  
116
DROP TABLE IF EXISTS `bookmarks`;
117
SET @saved_cs_client     = @@character_set_client;
118
SET character_set_client = utf8;
119
CREATE TABLE `bookmarks` (
120
  `id` int(11) NOT NULL auto_increment,
121
  `name` varchar(255) default NULL,
122
  `query` varchar(255) default NULL,
123
  `controller` varchar(255) default NULL,
124
  `public` tinyint(1) default NULL,
125
  `owner_id` int(11) default NULL,
126
  `owner_type` varchar(255) default NULL,
127
  PRIMARY KEY  (`id`),
128
  KEY `index_bookmarks_on_name` (`name`),
129
  KEY `index_bookmarks_on_controller` (`controller`),
130
  KEY `index_bookmarks_on_owner_id_and_owner_type` (`owner_id`,`owner_type`)
131
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
132
SET character_set_client = @saved_cs_client;
133

  
134
--
135
-- Table structure for table `config_templates`
136
--
137

  
138
DROP TABLE IF EXISTS `config_templates`;
139
SET @saved_cs_client     = @@character_set_client;
140
SET character_set_client = utf8;
141
CREATE TABLE `config_templates` (
142
  `id` int(11) NOT NULL auto_increment,
143
  `name` varchar(255) default NULL,
144
  `template` text,
145
  `snippet` tinyint(1) default NULL,
146
  `template_kind_id` int(11) default NULL,
147
  `created_at` datetime default NULL,
148
  `updated_at` datetime default NULL,
149
  PRIMARY KEY  (`id`)
150
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;
151
SET character_set_client = @saved_cs_client;
152

  
153
--
154
-- Table structure for table `config_templates_operatingsystems`
155
--
156

  
157
DROP TABLE IF EXISTS `config_templates_operatingsystems`;
158
SET @saved_cs_client     = @@character_set_client;
159
SET character_set_client = utf8;
160
CREATE TABLE `config_templates_operatingsystems` (
161
  `config_template_id` int(11) NOT NULL,
162
  `operatingsystem_id` int(11) NOT NULL
163
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
106 164
SET character_set_client = @saved_cs_client;
107 165

  
108 166
--
......
115 173
CREATE TABLE `domains` (
116 174
  `id` int(11) NOT NULL auto_increment,
117 175
  `name` varchar(255) NOT NULL default '',
118
  `dnsserver` varchar(255) default NULL,
119
  `gateway` varchar(40) default NULL,
120 176
  `fullname` varchar(32) default NULL,
121 177
  `created_at` datetime default NULL,
122 178
  `updated_at` datetime default NULL,
179
  `dns_id` int(11) default NULL,
123 180
  PRIMARY KEY  (`id`)
124
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
181
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
125 182
SET character_set_client = @saved_cs_client;
126 183

  
127 184
--
......
137 194
  `created_at` datetime default NULL,
138 195
  `updated_at` datetime default NULL,
139 196
  PRIMARY KEY  (`id`)
140
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
197
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;
141 198
SET character_set_client = @saved_cs_client;
142 199

  
143 200
--
......
167 224
  `created_at` datetime default NULL,
168 225
  PRIMARY KEY  (`id`),
169 226
  KEY `index_fact_names_on_name` (`name`)
170
) ENGINE=InnoDB AUTO_INCREMENT=488 DEFAULT CHARSET=latin1;
227
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=latin1;
171 228
SET character_set_client = @saved_cs_client;
172 229

  
173 230
--
......
179 236
SET character_set_client = utf8;
180 237
CREATE TABLE `fact_values` (
181 238
  `id` int(11) NOT NULL auto_increment,
182
  `value` varchar(255) character set utf8 collate utf8_bin NOT NULL,
239
  `value` text character set utf8 collate utf8_bin NOT NULL,
183 240
  `fact_name_id` int(11) NOT NULL,
184 241
  `host_id` int(11) NOT NULL,
185 242
  `updated_at` datetime default NULL,
......
187 244
  PRIMARY KEY  (`id`),
188 245
  KEY `index_fact_values_on_fact_name_id` (`fact_name_id`),
189 246
  KEY `index_fact_values_on_host_id` (`host_id`)
190
) ENGINE=InnoDB AUTO_INCREMENT=37761727 DEFAULT CHARSET=latin1;
247
) ENGINE=InnoDB AUTO_INCREMENT=2958423 DEFAULT CHARSET=latin1;
248
SET character_set_client = @saved_cs_client;
249

  
250
--
251
-- Table structure for table `features`
252
--
253

  
254
DROP TABLE IF EXISTS `features`;
255
SET @saved_cs_client     = @@character_set_client;
256
SET character_set_client = utf8;
257
CREATE TABLE `features` (
258
  `id` int(11) NOT NULL auto_increment,
259
  `name` varchar(16) default NULL,
260
  `created_at` datetime default NULL,
261
  `updated_at` datetime default NULL,
262
  PRIMARY KEY  (`id`)
263
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
264
SET character_set_client = @saved_cs_client;
265

  
266
--
267
-- Table structure for table `features_smart_proxies`
268
--
269

  
270
DROP TABLE IF EXISTS `features_smart_proxies`;
271
SET @saved_cs_client     = @@character_set_client;
272
SET character_set_client = utf8;
273
CREATE TABLE `features_smart_proxies` (
274
  `smart_proxy_id` int(11) default NULL,
275
  `feature_id` int(11) default NULL
276
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
277
SET character_set_client = @saved_cs_client;
278

  
279
--
280
-- Table structure for table `host_classes`
281
--
282

  
283
DROP TABLE IF EXISTS `host_classes`;
284
SET @saved_cs_client     = @@character_set_client;
285
SET character_set_client = utf8;
286
CREATE TABLE `host_classes` (
287
  `puppetclass_id` int(11) NOT NULL,
288
  `host_id` int(11) NOT NULL,
289
  `id` int(11) NOT NULL auto_increment,
290
  PRIMARY KEY  (`id`)
291
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;
191 292
SET character_set_client = @saved_cs_client;
192 293

  
193 294
--
......
202 303
  `name` varchar(255) default NULL,
203 304
  `created_at` datetime default NULL,
204 305
  `updated_at` datetime default NULL,
205
  PRIMARY KEY  (`id`)
206
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
306
  `environment_id` int(11) default NULL,
307
  `operatingsystem_id` int(11) default NULL,
308
  `architecture_id` int(11) default NULL,
309
  `medium_id` int(11) default NULL,
310
  `ptable_id` int(11) default NULL,
311
  `root_pass` varchar(255) default NULL,
312
  `puppetmaster_name` varchar(255) default NULL,
313
  `puppetproxy_id` int(11) default NULL,
314
  `use_image` tinyint(1) default NULL,
315
  `image_file` varchar(128) default NULL,
316
  `ancestry` varchar(255) default NULL,
317
  `vm_defaults` text,
318
  `subnet_id` int(11) default NULL,
319
  `domain_id` int(11) default NULL,
320
  PRIMARY KEY  (`id`),
321
  KEY `index_hostgroups_on_ancestry` (`ancestry`)
322
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
207 323
SET character_set_client = @saved_cs_client;
208 324

  
209 325
--
......
230 346
  `id` int(11) NOT NULL auto_increment,
231 347
  `name` varchar(255) NOT NULL,
232 348
  `ip` varchar(255) default NULL,
233
  `environment` varchar(255) default NULL,
349
  `environment` text,
234 350
  `last_compile` datetime default NULL,
235 351
  `last_freshcheck` datetime default NULL,
236 352
  `last_report` datetime default NULL,
......
243 359
  `sp_name` varchar(255) default '',
244 360
  `root_pass` varchar(64) default NULL,
245 361
  `serial` varchar(12) default NULL,
246
  `puppetmaster` varchar(255) default NULL,
362
  `puppetmaster_name` varchar(255) default NULL,
247 363
  `puppet_status` int(11) NOT NULL default '0',
248 364
  `domain_id` int(11) default NULL,
249 365
  `architecture_id` int(11) default NULL,
......
252 368
  `subnet_id` int(11) default NULL,
253 369
  `sp_subnet_id` int(11) default NULL,
254 370
  `ptable_id` int(11) default NULL,
255
  `media_id` int(11) default NULL,
371
  `medium_id` int(11) default NULL,
256 372
  `build` tinyint(1) default '0',
257 373
  `comment` text,
258 374
  `disk` text,
......
261 377
  `hostgroup_id` int(11) default NULL,
262 378
  `owner_id` int(11) default NULL,
263 379
  `owner_type` varchar(255) default NULL,
380
  `enabled` tinyint(1) default '1',
381
  `puppetproxy_id` int(11) default NULL,
382
  `managed` tinyint(1) default NULL,
383
  `use_image` tinyint(1) default NULL,
384
  `image_file` varchar(128) default NULL,
264 385
  PRIMARY KEY  (`id`),
265 386
  KEY `index_hosts_on_source_file_id` (`source_file_id`),
266 387
  KEY `index_hosts_on_name` (`name`),
......
271 392
  KEY `host_arch_id_ix` (`architecture_id`),
272 393
  KEY `host_os_id_ix` (`operatingsystem_id`),
273 394
  KEY `host_env_id_ix` (`environment_id`),
274
  KEY `host_media_id_ix` (`media_id`),
395
  KEY `host_medium_id_ix` (`medium_id`),
275 396
  KEY `host_group_id_ix` (`hostgroup_id`)
276
) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=latin1;
397
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=latin1;
277 398
SET character_set_client = @saved_cs_client;
278 399

  
279 400
--
280
-- Table structure for table `hosts_puppetclasses`
401
-- Table structure for table `hypervisors`
281 402
--
282 403

  
283
DROP TABLE IF EXISTS `hosts_puppetclasses`;
404
DROP TABLE IF EXISTS `hypervisors`;
284 405
SET @saved_cs_client     = @@character_set_client;
285 406
SET character_set_client = utf8;
286
CREATE TABLE `hosts_puppetclasses` (
287
  `puppetclass_id` int(11) NOT NULL,
288
  `host_id` int(11) NOT NULL
407
CREATE TABLE `hypervisors` (
408
  `id` int(11) NOT NULL auto_increment,
409
  `name` varchar(255) default NULL,
410
  `uri` varchar(255) default NULL,
411
  `kind` varchar(255) default NULL,
412
  `created_at` datetime default NULL,
413
  `updated_at` datetime default NULL,
414
  PRIMARY KEY  (`id`)
415
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
416
SET character_set_client = @saved_cs_client;
417

  
418
--
419
-- Table structure for table `inventory_facts`
420
--
421

  
422
DROP TABLE IF EXISTS `inventory_facts`;
423
SET @saved_cs_client     = @@character_set_client;
424
SET character_set_client = utf8;
425
CREATE TABLE `inventory_facts` (
426
  `node_id` int(11) NOT NULL,
427
  `name` varchar(255) NOT NULL,
428
  `value` text NOT NULL,
429
  `created_at` datetime default NULL,
430
  UNIQUE KEY `index_inventory_facts_on_node_id_and_name` (`node_id`,`name`)
431
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
432
SET character_set_client = @saved_cs_client;
433

  
434
--
435
-- Table structure for table `inventory_nodes`
436
--
437

  
438
DROP TABLE IF EXISTS `inventory_nodes`;
439
SET @saved_cs_client     = @@character_set_client;
440
SET character_set_client = utf8;
441
CREATE TABLE `inventory_nodes` (
442
  `id` int(11) NOT NULL auto_increment,
443
  `name` varchar(255) NOT NULL,
444
  `timestamp` datetime NOT NULL,
445
  `updated_at` datetime default NULL,
446
  `created_at` datetime default NULL,
447
  PRIMARY KEY  (`id`),
448
  UNIQUE KEY `index_inventory_nodes_on_name` (`name`)
289 449
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
290 450
SET character_set_client = @saved_cs_client;
291 451

  
292 452
--
453
-- Table structure for table `logs`
454
--
455

  
456
DROP TABLE IF EXISTS `logs`;
457
SET @saved_cs_client     = @@character_set_client;
458
SET character_set_client = utf8;
459
CREATE TABLE `logs` (
460
  `id` int(11) NOT NULL auto_increment,
461
  `source_id` int(11) default NULL,
462
  `message_id` int(11) default NULL,
463
  `report_id` int(11) default NULL,
464
  `level_id` int(11) default NULL,
465
  `created_at` datetime default NULL,
466
  `updated_at` datetime default NULL,
467
  PRIMARY KEY  (`id`),
468
  KEY `index_logs_on_report_id` (`report_id`),
469
  KEY `index_logs_on_message_id` (`message_id`),
470
  KEY `index_logs_on_level_id` (`level_id`)
471
) ENGINE=InnoDB AUTO_INCREMENT=121114 DEFAULT CHARSET=latin1;
472
SET character_set_client = @saved_cs_client;
473

  
474
--
293 475
-- Table structure for table `lookup_keys`
294 476
--
295 477

  
......
301 483
  `key` varchar(255) default NULL,
302 484
  `created_at` datetime default NULL,
303 485
  `updated_at` datetime default NULL,
486
  `puppetclass_id` int(11) default NULL,
487
  `default_value` varchar(255) default NULL,
488
  `path` varchar(255) default NULL,
489
  `description` varchar(255) default NULL,
490
  `validator_type` varchar(255) default NULL,
491
  `validator_rule` varchar(255) default NULL,
304 492
  PRIMARY KEY  (`id`),
305
  KEY `index_lookup_keys_on_key` (`key`)
493
  KEY `index_lookup_keys_on_key` (`key`),
494
  KEY `index_lookup_keys_on_puppetclass_id` (`puppetclass_id`),
495
  KEY `index_lookup_keys_on_path` (`path`)
306 496
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
307 497
SET character_set_client = @saved_cs_client;
308 498

  
......
315 505
SET character_set_client = utf8;
316 506
CREATE TABLE `lookup_values` (
317 507
  `id` int(11) NOT NULL auto_increment,
318
  `priority` varchar(255) default NULL,
508
  `match` varchar(255) default NULL,
319 509
  `value` varchar(255) default NULL,
320 510
  `lookup_key_id` int(11) default NULL,
321 511
  `created_at` datetime default NULL,
322 512
  `updated_at` datetime default NULL,
323 513
  PRIMARY KEY  (`id`),
324
  KEY `index_lookup_values_on_priority` (`priority`)
514
  KEY `index_lookup_values_on_priority` (`match`),
515
  KEY `index_lookup_values_on_match` (`match`)
325 516
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
326 517
SET character_set_client = @saved_cs_client;
327 518

  
328 519
--
329
-- Table structure for table `medias`
520
-- Table structure for table `media`
330 521
--
331 522

  
332
DROP TABLE IF EXISTS `medias`;
523
DROP TABLE IF EXISTS `media`;
333 524
SET @saved_cs_client     = @@character_set_client;
334 525
SET character_set_client = utf8;
335
CREATE TABLE `medias` (
526
CREATE TABLE `media` (
336 527
  `id` int(11) NOT NULL auto_increment,
337 528
  `name` varchar(50) NOT NULL default '',
338 529
  `path` varchar(100) NOT NULL default '',
339 530
  `created_at` datetime default NULL,
340 531
  `updated_at` datetime default NULL,
532
  `media_path` varchar(128) default NULL,
533
  `config_path` varchar(128) default NULL,
534
  `image_path` varchar(128) default NULL,
341 535
  PRIMARY KEY  (`id`)
342
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
536
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
343 537
SET character_set_client = @saved_cs_client;
344 538

  
345 539
--
346
-- Table structure for table `medias_operatingsystems`
540
-- Table structure for table `media_operatingsystems`
347 541
--
348 542

  
349
DROP TABLE IF EXISTS `medias_operatingsystems`;
543
DROP TABLE IF EXISTS `media_operatingsystems`;
350 544
SET @saved_cs_client     = @@character_set_client;
351 545
SET character_set_client = utf8;
352
CREATE TABLE `medias_operatingsystems` (
353
  `media_id` int(11) NOT NULL,
546
CREATE TABLE `media_operatingsystems` (
547
  `medium_id` int(11) NOT NULL,
354 548
  `operatingsystem_id` int(11) NOT NULL
355 549
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
356 550
SET character_set_client = @saved_cs_client;
357 551

  
358 552
--
553
-- Table structure for table `messages`
554
--
555

  
556
DROP TABLE IF EXISTS `messages`;
557
SET @saved_cs_client     = @@character_set_client;
558
SET character_set_client = utf8;
559
CREATE TABLE `messages` (
560
  `id` int(11) NOT NULL auto_increment,
561
  `value` text,
562
  PRIMARY KEY  (`id`),
563
  FULLTEXT KEY `value` (`value`)
564
) ENGINE=MyISAM AUTO_INCREMENT=2705 DEFAULT CHARSET=latin1;
565
SET character_set_client = @saved_cs_client;
566

  
567
--
359 568
-- Table structure for table `models`
360 569
--
361 570

  
......
368 577
  `info` text,
369 578
  `created_at` datetime default NULL,
370 579
  `updated_at` datetime default NULL,
580
  `vendor_class` varchar(32) default NULL,
581
  `hardware_model` varchar(16) default NULL,
371 582
  PRIMARY KEY  (`id`)
372
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
583
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
584
SET character_set_client = @saved_cs_client;
585

  
586
--
587
-- Table structure for table `notices`
588
--
589

  
590
DROP TABLE IF EXISTS `notices`;
591
SET @saved_cs_client     = @@character_set_client;
592
SET character_set_client = utf8;
593
CREATE TABLE `notices` (
594
  `id` int(11) NOT NULL auto_increment,
595
  `content` varchar(1024) NOT NULL,
596
  `global` tinyint(1) NOT NULL default '1',
597
  `level` varchar(255) NOT NULL,
598
  `created_at` datetime default NULL,
599
  `updated_at` datetime default NULL,
600
  PRIMARY KEY  (`id`)
601
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
373 602
SET character_set_client = @saved_cs_client;
374 603

  
375 604
--
......
387 616
  `nameindicator` varchar(3) default NULL,
388 617
  `created_at` datetime default NULL,
389 618
  `updated_at` datetime default NULL,
390
  `family_id` int(11) default NULL,
391 619
  `release_name` varchar(64) default NULL,
392
  PRIMARY KEY  (`id`)
393
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
620
  `type` varchar(16) default NULL,
621
  PRIMARY KEY  (`id`),
622
  KEY `index_operatingsystems_on_type` (`type`)
623
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
394 624
SET character_set_client = @saved_cs_client;
395 625

  
396 626
--
......
420 650
SET character_set_client = @saved_cs_client;
421 651

  
422 652
--
653
-- Table structure for table `os_default_templates`
654
--
655

  
656
DROP TABLE IF EXISTS `os_default_templates`;
657
SET @saved_cs_client     = @@character_set_client;
658
SET character_set_client = utf8;
659
CREATE TABLE `os_default_templates` (
660
  `id` int(11) NOT NULL auto_increment,
661
  `config_template_id` int(11) default NULL,
662
  `template_kind_id` int(11) default NULL,
663
  `operatingsystem_id` int(11) default NULL,
664
  `created_at` datetime default NULL,
665
  `updated_at` datetime default NULL,
666
  PRIMARY KEY  (`id`)
667
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
668
SET character_set_client = @saved_cs_client;
669

  
670
--
423 671
-- Table structure for table `param_names`
424 672
--
425 673

  
......
433 681
  `created_at` datetime default NULL,
434 682
  PRIMARY KEY  (`id`),
435 683
  KEY `index_param_names_on_name` (`name`)
436
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=latin1;
684
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=latin1;
437 685
SET character_set_client = @saved_cs_client;
438 686

  
439 687
--
......
454 702
  PRIMARY KEY  (`id`),
455 703
  KEY `index_param_values_on_param_name_id` (`param_name_id`),
456 704
  KEY `index_param_values_on_resource_id` (`resource_id`)
457
) ENGINE=InnoDB AUTO_INCREMENT=753079 DEFAULT CHARSET=latin1;
705
) ENGINE=InnoDB AUTO_INCREMENT=64313 DEFAULT CHARSET=latin1;
458 706
SET character_set_client = @saved_cs_client;
459 707

  
460 708
--
......
468 716
  `id` int(11) NOT NULL auto_increment,
469 717
  `name` varchar(255) default NULL,
470 718
  `value` varchar(255) default NULL,
471
  `host_id` int(11) default NULL,
719
  `reference_id` int(11) default NULL,
472 720
  `created_at` datetime default NULL,
473 721
  `updated_at` datetime default NULL,
474
  `hostgroup_id` int(11) default NULL,
475 722
  `type` varchar(255) default NULL,
476
  `domain_id` int(11) default NULL,
723
  `priority` int(11) default NULL,
477 724
  PRIMARY KEY  (`id`),
478
  KEY `index_parameters_on_host_id_and_type` (`host_id`,`type`),
479
  KEY `index_parameters_on_hostgroup_id_and_type` (`hostgroup_id`,`type`),
480
  KEY `index_parameters_on_domain_id_and_type` (`domain_id`,`type`),
481
  KEY `index_parameters_on_type` (`type`)
482
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
725
  KEY `index_parameters_on_type` (`type`),
726
  KEY `index_parameters_on_reference_id_and_type` (`reference_id`,`type`)
727
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=latin1;
483 728
SET character_set_client = @saved_cs_client;
484 729

  
485 730
--
......
497 742
  `created_at` datetime default NULL,
498 743
  `updated_at` datetime default NULL,
499 744
  PRIMARY KEY  (`id`)
500
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
745
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
501 746
SET character_set_client = @saved_cs_client;
502 747

  
503 748
--
......
514 759
  `created_at` datetime default NULL,
515 760
  PRIMARY KEY  (`id`),
516 761
  KEY `index_puppet_tags_on_id` (`id`)
517
) ENGINE=InnoDB AUTO_INCREMENT=653 DEFAULT CHARSET=latin1;
762
) ENGINE=InnoDB AUTO_INCREMENT=192 DEFAULT CHARSET=latin1;
518 763
SET character_set_client = @saved_cs_client;
519 764

  
520 765
--
......
527 772
CREATE TABLE `puppetclasses` (
528 773
  `id` int(11) NOT NULL auto_increment,
529 774
  `name` varchar(255) default NULL,
530
  `nameindicator` varchar(255) default NULL,
531
  `operatingsystem_id` int(11) default NULL,
532 775
  `created_at` datetime default NULL,
533 776
  `updated_at` datetime default NULL,
534 777
  PRIMARY KEY  (`id`)
535
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=latin1;
778
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=latin1;
536 779
SET character_set_client = @saved_cs_client;
537 780

  
538 781
--
......
545 788
CREATE TABLE `reports` (
546 789
  `id` int(11) NOT NULL auto_increment,
547 790
  `host_id` int(11) NOT NULL,
548
  `log` mediumtext,
549 791
  `reported_at` datetime default NULL,
550 792
  `created_at` datetime default NULL,
551 793
  `updated_at` datetime default NULL,
552 794
  `status` int(11) default NULL,
795
  `metrics` text,
553 796
  PRIMARY KEY  (`id`),
554 797
  KEY `index_reports_on_reported_at_and_host_id` (`reported_at`,`host_id`),
555 798
  KEY `index_reports_on_status` (`status`),
556 799
  KEY `index_reports_on_host_id` (`host_id`),
557 800
  KEY `index_reports_on_reported_at` (`reported_at`)
558
) ENGINE=InnoDB AUTO_INCREMENT=410903 DEFAULT CHARSET=latin1;
801
) ENGINE=InnoDB AUTO_INCREMENT=42500 DEFAULT CHARSET=latin1;
559 802
SET character_set_client = @saved_cs_client;
560 803

  
561 804
--
......
574 817
  PRIMARY KEY  (`id`),
575 818
  KEY `index_resource_tags_on_resource_id` (`resource_id`),
576 819
  KEY `index_resource_tags_on_puppet_tag_id` (`puppet_tag_id`)
577
) ENGINE=InnoDB AUTO_INCREMENT=1330247 DEFAULT CHARSET=latin1;
820
) ENGINE=InnoDB AUTO_INCREMENT=20192 DEFAULT CHARSET=latin1;
578 821
SET character_set_client = @saved_cs_client;
579 822

  
580 823
--
......
598 841
  KEY `index_resources_on_host_id` (`host_id`),
599 842
  KEY `index_resources_on_source_file_id` (`source_file_id`),
600 843
  KEY `typentitle` (`restype`,`title`(50))
601
) ENGINE=InnoDB AUTO_INCREMENT=125828 DEFAULT CHARSET=latin1;
844
) ENGINE=InnoDB AUTO_INCREMENT=2807 DEFAULT CHARSET=latin1;
845
SET character_set_client = @saved_cs_client;
846

  
847
--
848
-- Table structure for table `roles`
849
--
850

  
851
DROP TABLE IF EXISTS `roles`;
852
SET @saved_cs_client     = @@character_set_client;
853
SET character_set_client = utf8;
854
CREATE TABLE `roles` (
855
  `id` int(11) NOT NULL auto_increment,
856
  `name` varchar(30) default NULL,
857
  `builtin` int(11) default NULL,
858
  `permissions` text,
859
  PRIMARY KEY  (`id`)
860
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
602 861
SET character_set_client = @saved_cs_client;
603 862

  
604 863
--
......
610 869
SET character_set_client = utf8;
611 870
CREATE TABLE `schema_migrations` (
612 871
  `version` varchar(255) NOT NULL,
872
  `created_at` datetime default NULL,
613 873
  UNIQUE KEY `unique_schema_migrations` (`version`)
614 874
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
615 875
SET character_set_client = @saved_cs_client;
......
630 890
  PRIMARY KEY  (`id`),
631 891
  KEY `index_sessions_on_session_id` (`session_id`),
632 892
  KEY `index_sessions_on_updated_at` (`updated_at`)
633
) ENGINE=InnoDB AUTO_INCREMENT=823384 DEFAULT CHARSET=latin1;
893
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;
894
SET character_set_client = @saved_cs_client;
895

  
896
--
897
-- Table structure for table `settings`
898
--
899

  
900
DROP TABLE IF EXISTS `settings`;
901
SET @saved_cs_client     = @@character_set_client;
902
SET character_set_client = utf8;
903
CREATE TABLE `settings` (
904
  `id` int(11) NOT NULL auto_increment,
905
  `name` varchar(255) default NULL,
906
  `value` text,
907
  `description` text,
908
  `category` varchar(255) default NULL,
909
  `settings_type` varchar(255) default NULL,
910
  `default` text NOT NULL,
911
  `created_at` datetime default NULL,
912
  `updated_at` datetime default NULL,
913
  PRIMARY KEY  (`id`),
914
  UNIQUE KEY `index_settings_on_name` (`name`)
915
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
916
SET character_set_client = @saved_cs_client;
917

  
918
--
919
-- Table structure for table `smart_proxies`
920
--
921

  
922
DROP TABLE IF EXISTS `smart_proxies`;
923
SET @saved_cs_client     = @@character_set_client;
924
SET character_set_client = utf8;
925
CREATE TABLE `smart_proxies` (
926
  `id` int(11) NOT NULL auto_increment,
927
  `name` varchar(255) default NULL,
928
  `url` varchar(255) default NULL,
929
  `created_at` datetime default NULL,
930
  `updated_at` datetime default NULL,
931
  PRIMARY KEY  (`id`)
932
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
634 933
SET character_set_client = @saved_cs_client;
635 934

  
636 935
--
......
648 947
  `created_at` datetime default NULL,
649 948
  PRIMARY KEY  (`id`),
650 949
  KEY `index_source_files_on_filename` (`filename`)
651
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=latin1;
950
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=latin1;
951
SET character_set_client = @saved_cs_client;
952

  
953
--
954
-- Table structure for table `sources`
955
--
956

  
957
DROP TABLE IF EXISTS `sources`;
958
SET @saved_cs_client     = @@character_set_client;
959
SET character_set_client = utf8;
960
CREATE TABLE `sources` (
961
  `id` int(11) NOT NULL auto_increment,
962
  `value` text,
963
  PRIMARY KEY  (`id`),
964
  FULLTEXT KEY `value` (`value`)
965
) ENGINE=MyISAM AUTO_INCREMENT=607 DEFAULT CHARSET=latin1;
652 966
SET character_set_client = @saved_cs_client;
653 967

  
654 968
--
......
660 974
SET character_set_client = utf8;
661 975
CREATE TABLE `subnets` (
662 976
  `id` int(11) NOT NULL auto_increment,
663
  `number` varchar(15) default NULL,
977
  `network` varchar(15) default NULL,
664 978
  `mask` varchar(15) default NULL,
665 979
  `domain_id` int(11) default NULL,
666 980
  `priority` int(11) default NULL,
......
669 983
  `vlanid` varchar(10) default NULL,
670 984
  `created_at` datetime default NULL,
671 985
  `updated_at` datetime default NULL,
986
  `dhcp_id` int(11) default NULL,
987
  `tftp_id` int(11) default NULL,
988
  PRIMARY KEY  (`id`)
989
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
990
SET character_set_client = @saved_cs_client;
991

  
992
--
993
-- Table structure for table `template_combinations`
994
--
995

  
996
DROP TABLE IF EXISTS `template_combinations`;
997
SET @saved_cs_client     = @@character_set_client;
998
SET character_set_client = utf8;
999
CREATE TABLE `template_combinations` (
1000
  `id` int(11) NOT NULL auto_increment,
1001
  `config_template_id` int(11) default NULL,
1002
  `hostgroup_id` int(11) default NULL,
1003
  `environment_id` int(11) default NULL,
1004
  `created_at` datetime default NULL,
1005
  `updated_at` datetime default NULL,
672 1006
  PRIMARY KEY  (`id`)
673 1007
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
674 1008
SET character_set_client = @saved_cs_client;
675 1009

  
676 1010
--
1011
-- Table structure for table `template_kinds`
1012
--
1013

  
1014
DROP TABLE IF EXISTS `template_kinds`;
1015
SET @saved_cs_client     = @@character_set_client;
1016
SET character_set_client = utf8;
1017
CREATE TABLE `template_kinds` (
1018
  `id` int(11) NOT NULL auto_increment,
1019
  `name` varchar(255) default NULL,
1020
  `created_at` datetime default NULL,
1021
  `updated_at` datetime default NULL,
1022
  PRIMARY KEY  (`id`)
1023
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
1024
SET character_set_client = @saved_cs_client;
1025

  
1026
--
1027
-- Table structure for table `user_domains`
1028
--
1029

  
1030
DROP TABLE IF EXISTS `user_domains`;
1031
SET @saved_cs_client     = @@character_set_client;
1032
SET character_set_client = utf8;
1033
CREATE TABLE `user_domains` (
1034
  `user_id` int(11) default NULL,
1035
  `domain_id` int(11) default NULL
1036
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1037
SET character_set_client = @saved_cs_client;
1038

  
1039
--
1040
-- Table structure for table `user_facts`
1041
--
1042

  
1043
DROP TABLE IF EXISTS `user_facts`;
1044
SET @saved_cs_client     = @@character_set_client;
1045
SET character_set_client = utf8;
1046
CREATE TABLE `user_facts` (
1047
  `id` int(11) NOT NULL auto_increment,
1048
  `user_id` int(11) default NULL,
1049
  `fact_name_id` int(11) default NULL,
1050
  `criteria` varchar(255) default NULL,
1051
  `operator` varchar(3) default '=',
1052
  `andor` varchar(3) default 'or',
1053
  `created_at` datetime default NULL,
1054
  `updated_at` datetime default NULL,
1055
  PRIMARY KEY  (`id`)
1056
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1057
SET character_set_client = @saved_cs_client;
1058

  
1059
--
1060
-- Table structure for table `user_hostgroups`
1061
--
1062

  
1063
DROP TABLE IF EXISTS `user_hostgroups`;
1064
SET @saved_cs_client     = @@character_set_client;
1065
SET character_set_client = utf8;
1066
CREATE TABLE `user_hostgroups` (
1067
  `user_id` int(11) default NULL,
1068
  `hostgroup_id` int(11) default NULL
1069
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1070
SET character_set_client = @saved_cs_client;
1071

  
1072
--
1073
-- Table structure for table `user_notices`
1074
--
1075

  
1076
DROP TABLE IF EXISTS `user_notices`;
1077
SET @saved_cs_client     = @@character_set_client;
1078
SET character_set_client = utf8;
1079
CREATE TABLE `user_notices` (
1080
  `user_id` int(11) default NULL,
1081
  `notice_id` int(11) default NULL
1082
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1083
SET character_set_client = @saved_cs_client;
1084

  
1085
--
1086
-- Table structure for table `user_roles`
1087
--
1088

  
1089
DROP TABLE IF EXISTS `user_roles`;
1090
SET @saved_cs_client     = @@character_set_client;
1091
SET character_set_client = utf8;
1092
CREATE TABLE `user_roles` (
1093
  `id` int(11) NOT NULL auto_increment,
1094
  `user_id` int(11) default NULL,
1095
  `role_id` int(11) default NULL,
1096
  PRIMARY KEY  (`id`)
1097
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
1098
SET character_set_client = @saved_cs_client;
1099

  
1100
--
677 1101
-- Table structure for table `usergroup_members`
678 1102
--
679 1103

  
......
723 1147
  `auth_source_id` int(11) default NULL,
724 1148
  `created_at` datetime default NULL,
725 1149
  `updated_at` datetime default NULL,
1150
  `password_hash` varchar(128) default NULL,
1151
  `password_salt` varchar(128) default NULL,
1152
  `role_id` int(11) default NULL,
1153
  `domains_andor` varchar(3) default 'or',
1154
  `hostgroups_andor` varchar(3) default 'or',
1155
  `facts_andor` varchar(3) default 'or',
1156
  `filter_on_owner` tinyint(1) default NULL,
726 1157
  PRIMARY KEY  (`id`)
727
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
1158
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
728 1159
SET character_set_client = @saved_cs_client;
729 1160
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
730 1161

  
......
736 1167
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
737 1168
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
738 1169

  
739
-- Dump completed on 2012-03-05 10:37:08
1170
-- Dump completed on 2012-03-26 12:16:38