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