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

Unified Diff: sitescripts/urlfixer/schema.sql

Issue 8483155: Added typo data collection (/submitData) (Closed)
Patch Set: Created Oct. 9, 2012, 1:46 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/urlfixer/schema.sql
===================================================================
new file mode 100644
--- /dev/null
+++ b/sitescripts/urlfixer/schema.sql
@@ -0,0 +1,23 @@
+DROP TABLE IF EXISTS domains;
+DROP TABLE IF EXISTS corrections;
+
+CREATE TABLE domains(
+ id INT NOT NULL AUTO_INCREMENT,
+ domain VARCHAR(50) NOT NULL,
+ PRIMARY KEY(id)
+);
+
+CREATE TABLE corrections(
+ id INT NOT NULL AUTO_INCREMENT,
+ domain INT NOT NULL,
+ status INT NOT NULL,
+ curr_month INT NOT NULL,
+ prev_month INT NOT NULL,
+ curr_year INT NOT NULL,
+ prev_year INT NOT NULL,
+ PRIMARY KEY(id),
+ FOREIGN KEY(domain) REFERENCES domains(id)
+);
+
+CREATE UNIQUE INDEX idx_domain ON domains(domain);
+CREATE UNIQUE INDEX idx_domain_status ON corrections(domain, status);

Powered by Google App Engine
This is Rietveld