generated from tidb-incubator/tidb-template-project
-
Notifications
You must be signed in to change notification settings - Fork 13
/
bot.sql
469 lines (404 loc) · 15.3 KB
/
bot.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
/*!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 `approve_records`
--
DROP TABLE IF EXISTS `approve_records`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `approve_records` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`github` varchar(1023) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `approve_records`
--
LOCK TABLES `approve_records` WRITE;
/*!40000 ALTER TABLE `approve_records` DISABLE KEYS */;
/*!40000 ALTER TABLE `approve_records` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auto_merge_allow_names`
--
DROP TABLE IF EXISTS `auto_merge_allow_names`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auto_merge_allow_names` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`username` varchar(1023) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auto_merge_allow_names`
--
LOCK TABLES `auto_merge_allow_names` WRITE;
/*!40000 ALTER TABLE `auto_merge_allow_names` DISABLE KEYS */;
/*!40000 ALTER TABLE `auto_merge_allow_names` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auto_merges`
--
DROP TABLE IF EXISTS `auto_merges`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auto_merges` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_number` int(11) DEFAULT NULL,
`owner` varchar(1023) COLLATE utf8_bin DEFAULT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`base_ref` varchar(1023) COLLATE utf8_bin NOT NULL,
`started` tinyint(1) NOT NULL,
`status` int(11) NOT NULL,
`err` varchar(1023) COLLATE utf8_bin DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`synced` boolean NOT NULL DEFAULT FALSE,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auto_merges`
--
LOCK TABLES `auto_merges` WRITE;
/*!40000 ALTER TABLE `auto_merges` DISABLE KEYS */;
/*!40000 ALTER TABLE `auto_merges` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test_jobs`
--
DROP TABLE IF EXISTS `test_jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test_jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`merge_job_id` int(11) NOT NULL,
`state` varchar(31) NOT NULL,
`description` varchar(1023) COLLATE utf8_bin NOT NULL,
`target_url` varchar(1023) NOT NULL,
`context` varchar(1023) NOT NULL,
`synced` boolean NOT NULL DEFAULT FALSE,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `test_jobs`
--
LOCK TABLES `test_jobs` WRITE;
/*!40000 ALTER TABLE `test_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `autotest_jobs_merges` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `block_names`
--
DROP TABLE IF EXISTS `block_names`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `block_names` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`username` varchar(1023) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `block_names`
--
LOCK TABLES `block_names` WRITE;
/*!40000 ALTER TABLE `block_names` DISABLE KEYS */;
/*!40000 ALTER TABLE `block_names` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auto_update_reviewers`
--
DROP TABLE IF EXISTS `auto_update_reviewers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auto_update_reviewers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`update_owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`update_repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`reviewer` varchar(255) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auto_update_reviewers`
--
LOCK TABLES `auto_update_reviewers` WRITE;
/*!40000 ALTER TABLE `auto_update_reviewers` DISABLE KEYS */;
/*!40000 ALTER TABLE `auto_update_reviewers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `cherry_prs`
--
DROP TABLE IF EXISTS `cherry_prs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cherry_prs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_number` int(11) DEFAULT NULL,
`from_pull_number` int(11) DEFAULT NULL,
`owner` varchar(255) COLLATE utf8_bin DEFAULT '',
`repo` varchar(255) COLLATE utf8_bin DEFAULT '',
`title` text COLLATE utf8_bin,
`head` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`base` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
`body` text COLLATE utf8_bin NOT NULL,
`created_by_bot` tinyint(1) NOT NULL DEFAULT '0',
`try_time` int(11) NOT NULL DEFAULT '0',
`success` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `pr` (`pull_number`,`owner`,`repo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `cherry_prs`
--
LOCK TABLES `cherry_prs` WRITE;
/*!40000 ALTER TABLE `cherry_prs` DISABLE KEYS */;
/*!40000 ALTER TABLE `cherry_prs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `issue_redelivers`
--
DROP TABLE IF EXISTS `issue_redelivers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `issue_redelivers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`issue_number` int(11) DEFAULT NULL,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`channel` varchar(1023) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `issue_redelivers`
--
LOCK TABLES `issue_redelivers` WRITE;
/*!40000 ALTER TABLE `issue_redelivers` DISABLE KEYS */;
/*!40000 ALTER TABLE `issue_redelivers` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `label_checks`
--
DROP TABLE IF EXISTS `label_checks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `label_checks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_number` int(11) DEFAULT NULL,
`owner` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`repo` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`title` text COLLATE utf8_bin,
`has_label` tinyint(1) DEFAULT '0',
`send_notice` tinyint(1) NOT NULL DEFAULT '0',
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `label_checks`
--
LOCK TABLES `label_checks` WRITE;
/*!40000 ALTER TABLE `label_checks` DISABLE KEYS */;
/*!40000 ALTER TABLE `label_checks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pull_requests`
--
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,
`pull_number` int(11) DEFAULT NULL,
`owner` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`repo` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`title` text COLLATE utf8_bin,
`label` text COLLATE utf8_bin,
`merge` tinyint(1) DEFAULT '0',
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `pr` (`owner`,`pull_number`,`repo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pull_requests`
--
LOCK TABLES `pull_requests` WRITE;
/*!40000 ALTER TABLE `pull_requests` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_requests` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pull_status_checks`
--
DROP TABLE IF EXISTS `pull_status_checks`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_status_checks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_number` int(11) DEFAULT NULL,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`label` varchar(1023) COLLATE utf8_bin NOT NULL,
`duration` int(11) NOT NULL,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pull_status_checks`
--
LOCK TABLES `pull_status_checks` WRITE;
/*!40000 ALTER TABLE `pull_status_checks` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_status_checks` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `pull_status_controls`
--
DROP TABLE IF EXISTS `pull_status_controls`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pull_status_controls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pull_number` int(11) DEFAULT NULL,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`label` varchar(1023) COLLATE utf8_bin NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `pull_status_controls`
--
LOCK TABLES `pull_status_controls` WRITE;
/*!40000 ALTER TABLE `pull_status_controls` DISABLE KEYS */;
/*!40000 ALTER TABLE `pull_status_controls` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `slack_users`
--
DROP TABLE IF EXISTS `slack_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `slack_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`github` varchar(1023) COLLATE utf8_bin NOT NULL DEFAULT '',
`email` varchar(1023) COLLATE utf8_bin NOT NULL DEFAULT '',
`slack` varchar(1023) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `slack_users`
--
LOCK TABLES `slack_users` WRITE;
/*!40000 ALTER TABLE `slack_users` DISABLE KEYS */;
/*!40000 ALTER TABLE `slack_users` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `allow_names`
--
DROP TABLE IF EXISTS `allow_names`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `allow_names` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`username` varchar(1023) COLLATE utf8_bin NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `allow_names`
--
LOCK TABLES `allow_names` WRITE;
/*!40000 ALTER TABLE `allow_names` DISABLE KEYS */;
/*!40000 ALTER TABLE `allow_names` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
--
-- Table structure for table `release_versions`
--
DROP TABLE IF EXISTS `release_versions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `release_versions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`branch` varchar(511) COLLATE utf8_bin NOT NULL,
`version` varchar(511) COLLATE utf8_bin NOT NULL,
`start` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`end` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `release_versions`
--
LOCK TABLES `release_versions` WRITE;
/*!40000 ALTER TABLE `release_versions` DISABLE KEYS */;
/*!40000 ALTER TABLE `release_versions` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
--
-- Table structure for table `release_members`
--
DROP TABLE IF EXISTS `release_members`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `release_members` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` varchar(1023) COLLATE utf8_bin NOT NULL,
`repo` varchar(1023) COLLATE utf8_bin NOT NULL,
`branch` varchar(511) COLLATE utf8_bin NOT NULL,
`user` varchar(1023) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `release_members`
--
LOCK TABLES `release_members` WRITE;
/*!40000 ALTER TABLE `release_members` DISABLE KEYS */;
/*!40000 ALTER TABLE `release_members` 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 */;