-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdfsSystem.sql
52 lines (46 loc) · 1.92 KB
/
dfsSystem.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
-- IF EXISTS ( SELECT name FROM sys.databases WHERE name = 'nameServerFileList' ) DROP DATABASE `nameServerFileList`;
-- IF EXISTS ( SELECT name FROM sys.databases WHERE name = 'dataServerFileList' ) DROP DATABASE `dataServerFileList`;
DROP TABLE IF EXISTS `nameServerFileList`;
DROP TABLE IF EXISTS `dataServerFileList`;
CREATE TABLE IF NOT EXISTS `nameServerFileList` (
`fileID` INT UNSIGNED,
`fileName` VARCHAR(100) NOT NULL,
`filePath` VARCHAR(255) NOT NULL,
`fileLen` INT UNSIGNED,
PRIMARY KEY (`fileID`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- CREATE TABLE IF NOT EXISTS `dataServerFileChunkList` (
-- `fileID` INT UNSIGNED,
-- `chunkID` INT UNSIGNED,
-- `chunkFilePath` VARCHAR(255) NOT NULL,
-- `chunkFileName` VARCHAR(255) NOT NULL,
-- PRIMARY KEY (`fileID`)
-- )ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `dataServerFileList` (
`index` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`fileID` INT UNSIGNED,
`fileChunk` INT UNSIGNED,
`fileChunkTotal` INT UNSIGNED,
`filePath` VARCHAR(255) NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `dataServerFileList2` (
`index` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`fileID` INT UNSIGNED,
`fileChunk` INT UNSIGNED,
`fileChunkTotal` INT UNSIGNED,
`filePath` VARCHAR(255) NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `dataServerFileList3` (
`index` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`fileID` INT UNSIGNED,
`fileChunk` INT UNSIGNED,
`fileChunkTotal` INT UNSIGNED,
`filePath` VARCHAR(255) NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `dataServerFileList4` (
`index` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`fileID` INT UNSIGNED,
`fileChunk` INT UNSIGNED,
`fileChunkTotal` INT UNSIGNED,
`filePath` VARCHAR(255) NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET=utf8;