OLD | NEW |
1 DROP TABLE IF EXISTS crawler_sites; | 1 DROP TABLE IF EXISTS crawler_sites; |
2 DROP TABLE IF EXISTS crawler_runs; | 2 DROP TABLE IF EXISTS crawler_runs; |
3 DROP TABLE IF EXISTS crawler_data; | 3 DROP TABLE IF EXISTS crawler_requests; |
4 | 4 |
5 CREATE TABLE crawler_sites ( | 5 CREATE TABLE crawler_sites ( |
6 id INT NOT NULL AUTO_INCREMENT, | 6 id INT NOT NULL AUTO_INCREMENT, |
7 PRIMARY KEY (id), | 7 PRIMARY KEY (id), |
8 url VARCHAR(512) NOT NULL, | 8 url VARCHAR(1000) BINARY NOT NULL, |
9 UNIQUE (url) | 9 UNIQUE (url) |
10 ); | 10 ); |
11 | 11 |
12 CREATE TABLE crawler_runs ( | 12 CREATE TABLE crawler_runs ( |
13 id INT NOT NULL AUTO_INCREMENT, | 13 id INT NOT NULL AUTO_INCREMENT, |
14 PRIMARY KEY (id), | 14 PRIMARY KEY (id), |
15 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP | 15 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP |
16 ); | 16 ); |
17 | 17 |
18 CREATE TABLE crawler_data ( | 18 CREATE TABLE crawler_requests ( |
19 id INT NOT NULL AUTO_INCREMENT, | 19 id INT NOT NULL AUTO_INCREMENT, |
20 PRIMARY KEY (id), | 20 PRIMARY KEY (id), |
21 run INT NOT NULL, | 21 run INT NOT NULL, |
22 FOREIGN KEY (run) REFERENCES crawler_runs (id), | 22 FOREIGN KEY (run) REFERENCES crawler_runs (id), |
23 site INT NOT NULL, | 23 site INT NOT NULL, |
24 FOREIGN KEY (site) REFERENCES crawler_sites (id), | 24 FOREIGN KEY (site) REFERENCES crawler_sites (id), |
25 url VARCHAR(512) NOT NULL, | 25 url VARCHAR(512) NOT NULL, |
26 filtered BOOLEAN NOT NULL | 26 filtered BOOLEAN NOT NULL |
27 ); | 27 ); |
OLD | NEW |