-
Notifications
You must be signed in to change notification settings - Fork 5
/
tables.txt
467 lines (467 loc) · 21 KB
/
tables.txt
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
/*!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 */;
DROP TABLE IF EXISTS `commit_comments`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `commit_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`commit_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`body` varchar(256) DEFAULT NULL,
`line` int(11) DEFAULT NULL,
`position` int(11) DEFAULT NULL,
`comment_id` int(11) NOT NULL,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `comment_id` (`comment_id`),
KEY `commit_id` (`commit_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `commit_comments_ibfk_1` FOREIGN KEY (`commit_id`) REFERENCES `commits` (`id`),
CONSTRAINT `commit_comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1556658 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `commit_comments` WRITE;
/*!40000 ALTER TABLE `commit_comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `commit_comments` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `commit_parents`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `commit_parents` (
`commit_id` int(11) NOT NULL,
`parent_id` int(11) NOT NULL,
PRIMARY KEY (`commit_id`,`parent_id`),
KEY `parent_id` (`parent_id`),
CONSTRAINT `commit_parents_ibfk_1` FOREIGN KEY (`commit_id`) REFERENCES `commits` (`id`),
CONSTRAINT `commit_parents_ibfk_2` FOREIGN KEY (`parent_id`) REFERENCES `commits` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `commit_parents` WRITE;
/*!40000 ALTER TABLE `commit_parents` DISABLE KEYS */;
/*!40000 ALTER TABLE `commit_parents` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `commits`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `commits` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sha` varchar(40) DEFAULT NULL,
`author_id` int(11) DEFAULT NULL,
`committer_id` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `sha` (`sha`),
KEY `author_id` (`author_id`),
KEY `committer_id` (`committer_id`),
KEY `project_id` (`project_id`),
CONSTRAINT `commits_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`),
CONSTRAINT `commits_ibfk_2` FOREIGN KEY (`committer_id`) REFERENCES `users` (`id`),
CONSTRAINT `commits_ibfk_3` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=151217759 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `commits` WRITE;
/*!40000 ALTER TABLE `commits` DISABLE KEYS */;
/*!40000 ALTER TABLE `commits` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `counters`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `counters` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`day` date DEFAULT NULL,
`commit_comments` int(11) DEFAULT NULL,
`commit_parents` int(11) DEFAULT NULL,
`commits` int(11) DEFAULT NULL,
`followers` int(11) DEFAULT NULL,
`organization_members` int(11) DEFAULT NULL,
`projects` int(11) DEFAULT NULL,
`users` int(11) DEFAULT NULL,
`issues` int(11) DEFAULT NULL,
`pull_requests` int(11) DEFAULT NULL,
`issue_comments` int(11) DEFAULT NULL,
`pull_request_comments` int(11) DEFAULT NULL,
`pull_request_history` int(11) DEFAULT NULL,
`watchers` int(11) DEFAULT NULL,
`forks` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `counters` WRITE;
/*!40000 ALTER TABLE `counters` DISABLE KEYS */;
/*!40000 ALTER TABLE `counters` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `followers`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `followers` (
`follower_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`follower_id`,`user_id`),
KEY `follower_id` (`user_id`),
CONSTRAINT `follower_fk1` FOREIGN KEY (`follower_id`) REFERENCES `users` (`id`),
CONSTRAINT `follower_fk2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `followers` WRITE;
/*!40000 ALTER TABLE `followers` DISABLE KEYS */;
/*!40000 ALTER TABLE `followers` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `issue_comments`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issue_comments` (
`issue_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`comment_id` mediumtext NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
KEY `issue_id` (`issue_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `issue_comments_ibfk_1` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`id`),
CONSTRAINT `issue_comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `issue_comments` WRITE;
/*!40000 ALTER TABLE `issue_comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `issue_comments` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `issue_events`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issue_events` (
`event_id` mediumtext NOT NULL,
`issue_id` int(11) NOT NULL,
`actor_id` int(11) NOT NULL,
`action` varchar(255) NOT NULL,
`action_specific` varchar(50) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
KEY `issue_id` (`issue_id`),
KEY `actor_id` (`actor_id`),
CONSTRAINT `issue_events_ibfk_1` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`id`),
CONSTRAINT `issue_events_ibfk_2` FOREIGN KEY (`actor_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `issue_events` WRITE;
/*!40000 ALTER TABLE `issue_events` DISABLE KEYS */;
/*!40000 ALTER TABLE `issue_events` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `issue_labels`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issue_labels` (
`label_id` int(11) NOT NULL,
`issue_id` int(11) NOT NULL,
PRIMARY KEY (`issue_id`,`label_id`),
KEY `label_id` (`label_id`),
CONSTRAINT `issue_labels_ibfk_1` FOREIGN KEY (`label_id`) REFERENCES `repo_labels` (`id`),
CONSTRAINT `issue_labels_ibfk_2` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `issue_labels` WRITE;
/*!40000 ALTER TABLE `issue_labels` DISABLE KEYS */;
/*!40000 ALTER TABLE `issue_labels` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `issues`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`repo_id` int(11) DEFAULT NULL,
`reporter_id` int(11) DEFAULT NULL,
`assignee_id` int(11) DEFAULT NULL,
`pull_request` tinyint(1) NOT NULL,
`pull_request_id` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
`issue_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `repo_id` (`repo_id`),
KEY `reporter_id` (`reporter_id`),
KEY `assignee_id` (`assignee_id`),
KEY `pull_request_id` (`pull_request_id`),
KEY `issue_id` (`issue_id`),
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `projects` (`id`),
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`reporter_id`) REFERENCES `users` (`id`),
CONSTRAINT `issues_ibfk_3` FOREIGN KEY (`assignee_id`) REFERENCES `users` (`id`),
CONSTRAINT `issues_ibfk_4` FOREIGN KEY (`pull_request_id`) REFERENCES `pull_requests` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11010160 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `issues` WRITE;
/*!40000 ALTER TABLE `issues` DISABLE KEYS */;
/*!40000 ALTER TABLE `issues` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `organization_members`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `organization_members` (
`org_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`org_id`,`user_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `organization_members_ibfk_1` FOREIGN KEY (`org_id`) REFERENCES `users` (`id`),
CONSTRAINT `organization_members_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `organization_members` WRITE;
/*!40000 ALTER TABLE `organization_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `organization_members` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `project_commits`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_commits` (
`project_id` int(11) NOT NULL DEFAULT '0',
`commit_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`project_id`,`commit_id`),
KEY `commit_id` (`commit_id`),
CONSTRAINT `project_commits_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`),
CONSTRAINT `project_commits_ibfk_2` FOREIGN KEY (`commit_id`) REFERENCES `commits` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `project_commits` WRITE;
/*!40000 ALTER TABLE `project_commits` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_commits` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `project_members`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `project_members` (
`repo_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`repo_id`,`user_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `project_members_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `projects` (`id`),
CONSTRAINT `project_members_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `project_members` WRITE;
/*!40000 ALTER TABLE `project_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `project_members` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `projects`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(255) DEFAULT NULL,
`owner_id` int(11) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`language` varchar(255) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
`forked_from` int(11) DEFAULT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`owner_id`),
KEY `owner_id` (`owner_id`),
KEY `forked_from` (`forked_from`),
CONSTRAINT `projects_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`),
CONSTRAINT `projects_ibfk_2` FOREIGN KEY (`forked_from`) REFERENCES `projects` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11458363 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `projects` WRITE;
/*!40000 ALTER TABLE `projects` DISABLE KEYS */;
/*!40000 ALTER TABLE `projects` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `pull_request_comments`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_request_comments` (
`pull_request_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`comment_id` mediumtext NOT NULL,
`position` int(11) DEFAULT NULL,
`body` varchar(256) DEFAULT NULL,
`commit_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
UNIQUE KEY `comment_id` (`comment_id`(9)),
KEY `pull_request_id` (`pull_request_id`),
KEY `user_id` (`user_id`),
KEY `commit_id` (`commit_id`),
CONSTRAINT `pull_request_comments_ibfk_1` FOREIGN KEY (`pull_request_id`) REFERENCES `pull_requests` (`id`),
CONSTRAINT `pull_request_comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `pull_request_comments_ibfk_3` FOREIGN KEY (`commit_id`) REFERENCES `commits` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `pull_request_comments` WRITE;
/*!40000 ALTER TABLE `pull_request_comments` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_request_comments` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `pull_request_commits`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_request_commits` (
`pull_request_id` int(11) NOT NULL,
`commit_id` int(11) NOT NULL,
PRIMARY KEY (`pull_request_id`,`commit_id`),
KEY `commit_id` (`commit_id`),
CONSTRAINT `pull_request_commits_ibfk_1` FOREIGN KEY (`pull_request_id`) REFERENCES `pull_requests` (`id`),
CONSTRAINT `pull_request_commits_ibfk_2` FOREIGN KEY (`commit_id`) REFERENCES `commits` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `pull_request_commits` WRITE;
/*!40000 ALTER TABLE `pull_request_commits` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_request_commits` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `pull_request_history`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_request_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_request_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
`action` varchar(255) NOT NULL,
`actor_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `pull_request_id` (`pull_request_id`),
KEY `pull_request_history_ibfk_2` (`actor_id`),
CONSTRAINT `pull_request_history_ibfk_1` FOREIGN KEY (`pull_request_id`) REFERENCES `pull_requests` (`id`),
CONSTRAINT `pull_request_history_ibfk_2` FOREIGN KEY (`actor_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27517118 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `pull_request_history` WRITE;
/*!40000 ALTER TABLE `pull_request_history` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_request_history` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `pull_requests`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_requests` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`head_repo_id` int(11) DEFAULT NULL,
`base_repo_id` int(11) NOT NULL,
`head_commit_id` int(11) DEFAULT NULL,
`base_commit_id` int(11) NOT NULL,
`pullreq_id` int(11) NOT NULL,
`intra_branch` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pullreq_id` (`pullreq_id`,`base_repo_id`),
KEY `head_repo_id` (`head_repo_id`),
KEY `base_repo_id` (`base_repo_id`),
KEY `head_commit_id` (`head_commit_id`),
KEY `base_commit_id` (`base_commit_id`),
KEY `idx_pullreq_id` (`pullreq_id`),
CONSTRAINT `pull_requests_ibfk_1` FOREIGN KEY (`head_repo_id`) REFERENCES `projects` (`id`),
CONSTRAINT `pull_requests_ibfk_2` FOREIGN KEY (`base_repo_id`) REFERENCES `projects` (`id`),
CONSTRAINT `pull_requests_ibfk_3` FOREIGN KEY (`head_commit_id`) REFERENCES `commits` (`id`),
CONSTRAINT `pull_requests_ibfk_4` FOREIGN KEY (`base_commit_id`) REFERENCES `commits` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4445571 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `pull_requests` WRITE;
/*!40000 ALTER TABLE `pull_requests` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_requests` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `repo_labels`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `repo_labels` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`repo_id` int(11) DEFAULT NULL,
`name` varchar(24) NOT NULL,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `repo_id` (`repo_id`),
CONSTRAINT `repo_labels_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `projects` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10004341 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `repo_labels` WRITE;
/*!40000 ALTER TABLE `repo_labels` DISABLE KEYS */;
/*!40000 ALTER TABLE `repo_labels` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `repo_milestones`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `repo_milestones` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`repo_id` int(11) DEFAULT NULL,
`name` varchar(24) NOT NULL,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `repo_id` (`repo_id`),
CONSTRAINT `repo_milestones_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `projects` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `repo_milestones` WRITE;
/*!40000 ALTER TABLE `repo_milestones` DISABLE KEYS */;
/*!40000 ALTER TABLE `repo_milestones` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `schema_info`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_info` (
`version` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `schema_info` WRITE;
/*!40000 ALTER TABLE `schema_info` DISABLE KEYS */;
/*!40000 ALTER TABLE `schema_info` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `users`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(255) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`company` varchar(255) DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
`type` varchar(255) NOT NULL DEFAULT 'USR',
`fake` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `login` (`login`),
KEY `users_email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4940722 DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `watchers`
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `watchers` (
`repo_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ext_ref_id` varchar(24) NOT NULL DEFAULT '0',
PRIMARY KEY (`repo_id`,`user_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `watchers_ibfk_1` FOREIGN KEY (`repo_id`) REFERENCES `projects` (`id`),
CONSTRAINT `watchers_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `watchers` WRITE;
/*!40000 ALTER TABLE `watchers` DISABLE KEYS */;
/*!40000 ALTER TABLE `watchers` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!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 */;