-
Notifications
You must be signed in to change notification settings - Fork 11
/
init.sql
70 lines (63 loc) · 2.84 KB
/
init.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
CREATE DATABASE IF NOT EXISTS `shepherd_web`;
GRANT ALL ON `shepherd_web`.* TO 'shepherd_user'@'%' IDENTIFIED BY 'shepherd_mysql_development_password';
CREATE TABLE `shepherd_web`.`test_failures` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`git_commit` varchar(40) NOT NULL DEFAULT '',
`test_name` varchar(255) NOT NULL DEFAULT '',
`branch` varchar(127) NOT NULL DEFAULT '',
`repository` varchar(255) DEFAULT '',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `commit_test` (`git_commit`,`test_name`),
KEY `test_name` (`test_name`),
KEY `git_commit` (`git_commit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `shepherd_web`.`github_pr_reviews` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`github_pr_url` varchar(255) NOT NULL DEFAULT '',
`tool` enum('psalm','phpunit') NOT NULL DEFAULT 'psalm',
`github_review_id` varchar(255) NOT NULL DEFAULT '',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `review_for_tool` (`github_pr_url`,`tool`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `shepherd_web`.`github_pr_comments` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`github_pr_url` varchar(255) NOT NULL DEFAULT '',
`tool` enum('psalm','phpunit') NOT NULL DEFAULT 'psalm',
`github_comment_id` varchar(255) NOT NULL,
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `github_comment_tool` (`github_pr_url`,`tool`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `shepherd_web`.`github_pull_requests` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`git_commit` varchar(40) NOT NULL DEFAULT '',
`owner_name` varchar(127) NOT NULL DEFAULT '',
`repo_name` varchar(127) NOT NULL DEFAULT '',
`number` int(6) unsigned NOT NULL,
`branch` varchar(127) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `git_commit` (`git_commit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `shepherd_web`.`psalm_reports` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`git_commit` varchar(40) NOT NULL DEFAULT '',
`issues` mediumblob NOT NULL,
`mixed_count` int(10) unsigned NOT NULL,
`nonmixed_count` int(10) unsigned NOT NULL,
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `git_commit` (`git_commit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `shepherd_web`.`github_master_commits` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`git_commit` varchar(40) NOT NULL,
`owner_name` varchar(127) NOT NULL DEFAULT '',
`repo_name` varchar(127) NOT NULL DEFAULT '',
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `git_commit` (`git_commit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;