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

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

Issue 8483155: Added typo data collection (/submitData) (Closed)
Left Patch Set: Created Oct. 9, 2012, 1:46 p.m.
Right Patch Set: Created Oct. 9, 2012, 2:27 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
« no previous file with change/comment | « sitescripts/urlfixer/__init__.py ('k') | sitescripts/urlfixer/web/__init__.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 DROP TABLE IF EXISTS domains; 1 DROP TABLE IF EXISTS domains;
2 DROP TABLE IF EXISTS corrections; 2 DROP TABLE IF EXISTS corrections;
3 3
4 CREATE TABLE domains( 4 CREATE TABLE domains(
5 id INT NOT NULL AUTO_INCREMENT, 5 id INT NOT NULL AUTO_INCREMENT,
6 domain VARCHAR(50) NOT NULL, 6 domain VARCHAR(50) NOT NULL,
7 PRIMARY KEY(id) 7 PRIMARY KEY(id),
8 UNIQUE(domain)
8 ); 9 );
9 10
10 CREATE TABLE corrections( 11 CREATE TABLE corrections(
11 id INT NOT NULL AUTO_INCREMENT, 12 id INT NOT NULL AUTO_INCREMENT,
12 domain INT NOT NULL, 13 domain INT NOT NULL,
13 status INT NOT NULL, 14 status INT NOT NULL,
14 curr_month INT NOT NULL, 15 curr_month INT NOT NULL,
15 prev_month INT NOT NULL, 16 prev_month INT NOT NULL,
16 curr_year INT NOT NULL, 17 curr_year INT NOT NULL,
17 prev_year INT NOT NULL, 18 prev_year INT NOT NULL,
18 PRIMARY KEY(id), 19 PRIMARY KEY(id),
19 FOREIGN KEY(domain) REFERENCES domains(id) 20 FOREIGN KEY(domain) REFERENCES domains(id),
21 UNIQUE(domain, status)
20 ); 22 );
21
22 CREATE UNIQUE INDEX idx_domain ON domains(domain);
23 CREATE UNIQUE INDEX idx_domain_status ON corrections(domain, status);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld