Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: sitescripts/crawler/schema.sql

Issue 8327353: Crawler backend (Closed)
Left Patch Set: README fix Created Sept. 14, 2012, 2:42 p.m.
Right Patch Set: Created Sept. 27, 2012, 2:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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_data;
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(512) NOT NULL,
Wladimir Palant 2012/09/14 17:24:18 How about UNIQUE(url) constraint? This will make s
Felix Dahlke 2012/09/26 15:20:30 Done.
9 UNIQUE (url)
9 ); 10 );
10 11
11 CREATE TABLE crawler_runs ( 12 CREATE TABLE crawler_runs (
12 id INT NOT NULL AUTO_INCREMENT, 13 id INT NOT NULL AUTO_INCREMENT,
13 PRIMARY KEY (id), 14 PRIMARY KEY (id),
14 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP 15 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
15 ); 16 );
16 17
17 CREATE TABLE crawler_data ( 18 CREATE TABLE crawler_data (
18 id INT NOT NULL AUTO_INCREMENT, 19 id INT NOT NULL AUTO_INCREMENT,
19 PRIMARY KEY (id), 20 PRIMARY KEY (id),
20 run INT NOT NULL, 21 run INT NOT NULL,
21 FOREIGN KEY (run) REFERENCES crawler_runs (id), 22 FOREIGN KEY (run) REFERENCES crawler_runs (id),
22 site INT NOT NULL, 23 site INT NOT NULL,
23 FOREIGN KEY (site) REFERENCES crawler_sites (id), 24 FOREIGN KEY (site) REFERENCES crawler_sites (id),
24 url VARCHAR(512) NOT NULL, 25 url VARCHAR(512) NOT NULL,
25 filtered BOOLEAN NOT NULL 26 filtered BOOLEAN NOT NULL
26 ); 27 );
LEFTRIGHT

Powered by Google App Engine
This is Rietveld