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

Unified Diff: sitescripts/crawler/schema.sql

Issue 8327353: Crawler backend (Closed)
Patch Set: Created Sept. 27, 2012, 2:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sitescripts/crawler/schema.sql
===================================================================
new file mode 100644
--- /dev/null
+++ b/sitescripts/crawler/schema.sql
@@ -0,0 +1,27 @@
+DROP TABLE IF EXISTS crawler_sites;
+DROP TABLE IF EXISTS crawler_runs;
+DROP TABLE IF EXISTS crawler_data;
+
+CREATE TABLE crawler_sites (
+ id INT NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (id),
+ url VARCHAR(512) NOT NULL,
+ UNIQUE (url)
+);
+
+CREATE TABLE crawler_runs (
+ id INT NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (id),
+ timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE crawler_data (
+ id INT NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (id),
+ run INT NOT NULL,
+ FOREIGN KEY (run) REFERENCES crawler_runs (id),
+ site INT NOT NULL,
+ FOREIGN KEY (site) REFERENCES crawler_sites (id),
+ url VARCHAR(512) NOT NULL,
+ filtered BOOLEAN NOT NULL
+);

Powered by Google App Engine
This is Rietveld