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, 2:27 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
« no previous file with comments | « sitescripts/urlfixer/__init__.py ('k') | sitescripts/urlfixer/web/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/urlfixer/schema.sql
===================================================================
new file mode 100644
--- /dev/null
+++ b/sitescripts/urlfixer/schema.sql
@@ -0,0 +1,22 @@
+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),
+ UNIQUE(domain)
+);
+
+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),
+ UNIQUE(domain, status)
+);
« no previous file with comments | « sitescripts/urlfixer/__init__.py ('k') | sitescripts/urlfixer/web/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld