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

Side by Side Diff: sitescripts/crawler/schema.sql

Issue 8327353: Crawler backend (Closed)
Patch Set: Created Sept. 14, 2012, 2:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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(255) NOT NULL 8 url VARCHAR(512) NOT NULL
9 ); 9 );
10 10
11 CREATE TABLE crawler_runs ( 11 CREATE TABLE crawler_runs (
12 id INT NOT NULL AUTO_INCREMENT, 12 id INT NOT NULL AUTO_INCREMENT,
13 PRIMARY KEY (id), 13 PRIMARY KEY (id),
14 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP 14 timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
15 ); 15 );
16 16
17 CREATE TABLE crawler_data ( 17 CREATE TABLE crawler_data (
18 id INT NOT NULL AUTO_INCREMENT, 18 id INT NOT NULL AUTO_INCREMENT,
19 PRIMARY KEY (id), 19 PRIMARY KEY (id),
20 run INT NOT NULL, 20 run INT NOT NULL,
21 FOREIGN KEY (run) REFERENCES crawler_runs (id), 21 FOREIGN KEY (run) REFERENCES crawler_runs (id),
22 site INT NOT NULL, 22 site INT NOT NULL,
23 FOREIGN KEY (site) REFERENCES crawler_sites (id), 23 FOREIGN KEY (site) REFERENCES crawler_sites (id),
24 request_url VARCHAR(255) NOT NULL, 24 url VARCHAR(512) NOT NULL,
25 document_url VARCHAR(255) NOT NULL 25 filtered BOOLEAN NOT NULL
26 ); 26 );
OLDNEW

Powered by Google App Engine
This is Rietveld