-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize.sql
50 lines (45 loc) · 1.58 KB
/
initialize.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
-- created from a dump of the vm-sql database
USE oopslaDB;
DROP TABLE IF EXISTS `files`;
CREATE TABLE `files` (
`fileId` bigint(6) unsigned NOT NULL AUTO_INCREMENT,
`projectId` int(8) unsigned NOT NULL,
`relativePath` varchar(4000) DEFAULT NULL,
`relativeUrl` varchar(4000) DEFAULT NULL,
`fileHash` char(32) NOT NULL,
PRIMARY KEY (`fileId`),
KEY `projectId` (`projectId`),
KEY `fileHash` (`fileHash`)
) ENGINE=MyISAM AUTO_INCREMENT=50038474 DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `projects`;
CREATE TABLE `projects` (
`projectId` int(8) unsigned NOT NULL AUTO_INCREMENT,
`projectPath` varchar(4000) DEFAULT NULL,
`projectUrl` varchar(4000) DEFAULT NULL,
PRIMARY KEY (`projectId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `stats`;
CREATE TABLE `stats` (
`fileHash` char(32) NOT NULL,
`fileBytes` int(6) unsigned NOT NULL,
`fileLines` int(6) unsigned NOT NULL,
`fileLOC` int(6) unsigned NOT NULL,
`fileSLOC` int(6) unsigned NOT NULL,
`totalTokens` int(6) unsigned DEFAULT NULL,
`uniqueTokens` int(6) unsigned DEFAULT NULL,
`tokenHash` char(32) DEFAULT NULL,
PRIMARY KEY (`fileHash`),
KEY `tokenHash` (`tokenHash`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `CCPairs`;
CREATE TABLE `CCPairs` (
`projectId1` int(8) NOT NULL,
`fileId1` bigint(15) NOT NULL,
`projectId2` int(8) NOT NULL,
`fileId2` bigint(15) NOT NULL,
PRIMARY KEY (`fileId1`,`fileId2`),
KEY `projectId1` (`projectId1`),
KEY `fileId1` (`fileId1`),
KEY `projectId2` (`projectId2`),
KEY `fileId2` (`fileId2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;