This repository has been archived by the owner on Dec 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
working-schema.sql
544 lines (484 loc) · 26.4 KB
/
working-schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
-- MySQL dump 10.13 Distrib 5.6.10, for Linux (x86_64)
--
-- Host: localhost Database: strings
-- ------------------------------------------------------
-- Server version 5.6.10-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `application`
--
DROP TABLE IF EXISTS `application`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `application` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the application',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(64) NOT NULL COMMENT 'The name of the application',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `application_formation`
--
DROP TABLE IF EXISTS `application_formation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `application_formation` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`application_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the application',
`formation_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the formation',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `config`
--
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the config record',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'If applicable, the id of the organization that owns this record',
`var` varchar(128) NOT NULL COMMENT 'The config variable',
`val` longtext NOT NULL COMMENT 'The variable value',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `device`
--
DROP TABLE IF EXISTS `device`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the device',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`device_type_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the device_type that this device belongs to',
`implementation_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the implementation of this device',
`formation_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the formation this device belongs to',
`role_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the role this device belongs to',
`name` varchar(128) NOT NULL COMMENT 'The name of the device',
`status` enum('building','resizing','active','deleting','error') DEFAULT 'building' COMMENT 'The status of this device',
`can_sync_to_ldap` tinyint(1) DEFAULT '0' COMMENT 'Whether this device should be synced to ldap',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `device_attribute`
--
DROP TABLE IF EXISTS `device_attribute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_attribute` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the attribute',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`device_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the device',
`var` varchar(128) NOT NULL COMMENT 'The config variable',
`val` longtext NOT NULL COMMENT 'The variable value',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=422 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `device_dns`
--
DROP TABLE IF EXISTS `device_dns`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_dns` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the device dns record',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`device_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the device this record belongs to',
`name` varchar(255) NOT NULL COMMENT 'The name of the dns record',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `device_type`
--
DROP TABLE IF EXISTS `device_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_type` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the device type record',
`name` varchar(128) NOT NULL COMMENT 'The name of the device type',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `formation`
--
DROP TABLE IF EXISTS `formation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `formation` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the formation',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(128) NOT NULL COMMENT 'The name of the formation',
`status` enum('building','resizing','active','deleting','error') DEFAULT 'building' COMMENT 'The status of this formation',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `hiera`
--
DROP TABLE IF EXISTS `hiera`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hiera` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the hiera record',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`hiera_key` varchar(128) NOT NULL COMMENT 'The search key for hiera',
`var` varchar(128) NOT NULL COMMENT 'The configuration variable',
`val` longtext NOT NULL COMMENT 'The variable value',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `organization`
--
DROP TABLE IF EXISTS `organization`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `organization` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the organization',
`name` varchar(64) NOT NULL COMMENT 'The name of the organization',
`short_name` varchar(64) NOT NULL COMMENT 'A short name for the organization',
`is_disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not this organization is disabled',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `role`
--
DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the role',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(128) NOT NULL COMMENT 'The name of the role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `sudo`
--
DROP TABLE IF EXISTS `sudo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sudo` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the sudo role',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(128) NOT NULL COMMENT 'The name of the sudo role',
`is_hidden` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not the sudo role is hidden from the end user',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `sudo_attribute`
--
DROP TABLE IF EXISTS `sudo_attribute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sudo_attribute` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the sudo attribute',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`sudo_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the sudo role',
`name` enum('sudoCommand','sudoRunAs','sudoOption') NOT NULL COMMENT 'The name of the sudo attribute',
`value` varchar(128) NOT NULL COMMENT 'The value of the sudo attribute',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team`
--
DROP TABLE IF EXISTS `team`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the team',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(64) NOT NULL COMMENT 'The name of the team',
`is_disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not the team is disabled',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_application`
--
DROP TABLE IF EXISTS `team_application`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_application` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team',
`application_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the application',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_application_sudo`
--
DROP TABLE IF EXISTS `team_application_sudo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_application_sudo` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_application_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team to application mapping',
`sudo_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the sudo role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_device`
--
DROP TABLE IF EXISTS `team_device`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_device` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team',
`device_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the device',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_device_sudo`
--
DROP TABLE IF EXISTS `team_device_sudo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_device_sudo` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_device_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team to device mapping',
`sudo_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the sudo role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_formation`
--
DROP TABLE IF EXISTS `team_formation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_formation` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team',
`formation_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the formation',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_formation_sudo`
--
DROP TABLE IF EXISTS `team_formation_sudo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_formation_sudo` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_formation_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team to formation mapping',
`sudo_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the sudo role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_role`
--
DROP TABLE IF EXISTS `team_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_role` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team',
`role_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `team_role_sudo`
--
DROP TABLE IF EXISTS `team_role_sudo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `team_role_sudo` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`team_role_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team to role mapping',
`sudo_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the sudo role',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the user',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(64) NOT NULL COMMENT 'The username of the user',
`password` varchar(64) NOT NULL COMMENT 'The SHA1 password of the user',
`first_name` varchar(64) NOT NULL COMMENT 'The first name of the user',
`last_name` varchar(64) NOT NULL COMMENT 'The last name of the user',
`email` varchar(128) NOT NULL COMMENT 'The email address of the user',
`is_admin` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not the user is an admin',
`can_create_user` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not the user can create users',
`is_disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Whether or not the user is disabled',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_attribute`
--
DROP TABLE IF EXISTS `user_attribute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_attribute` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the attribute',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`user_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the user',
`var` varchar(128) NOT NULL COMMENT 'The config variable',
`val` longtext NOT NULL COMMENT 'The variable value',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_key`
--
DROP TABLE IF EXISTS `user_key`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_key` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the key',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`user_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the user',
`name` varchar(64) NOT NULL COMMENT 'The name of the key',
`public_key` text NOT NULL COMMENT 'The public key',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `user_team`
--
DROP TABLE IF EXISTS `user_team`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_team` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the mapping',
`organization_id` bigint(20) unsigned DEFAULT NULL COMMENT 'The id of the organization that owns this record',
`user_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the user',
`team_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the team',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `module`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `module` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the module',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`module_source_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the module source',
`short_name` varchar(128) NOT NULL COMMENT 'The friendly name of the module',
`name` varchar(255) NOT NULL COMMENT 'The name of the module',
`reference` varchar(255) DEFAULT NULL COMMENT 'Optional reference to version, revision, branch or tag of module',
`path` varchar(255) DEFAULT NULL COMMENT 'Optional path to module within the git repository',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `module_source`
--
DROP TABLE IF EXISTS `module_source`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `module_source` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The id of the module source',
`organization_id` bigint(20) unsigned NOT NULL COMMENT 'The id of the organization that owns this record',
`name` varchar(128) NOT NULL COMMENT 'The name of the module source',
`type` enum('forge','git') NOT NULL DEFAULT 'git' COMMENT 'The module source type',
`url` varchar(255) NOT NULL COMMENT 'The url of the module source',
`updated` datetime COMMENT 'The date and time of the last update to this record',
`created` datetime COMMENT 'The date and time this record was created',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2013-06-19 23:27:23