OLD | NEW |
(Empty) | |
| 1 DROP TABLE IF EXISTS domains; |
| 2 DROP TABLE IF EXISTS corrections; |
| 3 |
| 4 CREATE TABLE domains( |
| 5 id INT NOT NULL AUTO_INCREMENT, |
| 6 domain VARCHAR(50) NOT NULL, |
| 7 PRIMARY KEY(id), |
| 8 UNIQUE(domain) |
| 9 ); |
| 10 |
| 11 CREATE TABLE corrections( |
| 12 id INT NOT NULL AUTO_INCREMENT, |
| 13 domain INT NOT NULL, |
| 14 status INT NOT NULL, |
| 15 curr_month INT NOT NULL, |
| 16 prev_month INT NOT NULL, |
| 17 curr_year INT NOT NULL, |
| 18 prev_year INT NOT NULL, |
| 19 PRIMARY KEY(id), |
| 20 FOREIGN KEY(domain) REFERENCES domains(id), |
| 21 UNIQUE(domain, status) |
| 22 ); |
OLD | NEW |