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

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

Issue 8867001: Reports - cleaning users (Closed)
Patch Set: Created Nov. 16, 2012, 8:30 a.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 /*!40101 SET @saved_cs_client = @@character_set_client */; 1 /*!40101 SET @saved_cs_client = @@character_set_client */;
2 /*!40101 SET character_set_client = utf8 */; 2 /*!40101 SET character_set_client = utf8 */;
3 CREATE TABLE `subscriptions` ( 3 CREATE TABLE `subscriptions` (
4 `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 4 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
5 `url` varchar(255) NOT NULL, 5 `url` varchar(255) NOT NULL,
6 PRIMARY KEY (`id`) 6 PRIMARY KEY (`id`)
7 ) DEFAULT CHARSET=utf8; 7 ) DEFAULT CHARSET=utf8;
8 /*!40101 SET character_set_client = @saved_cs_client */; 8 /*!40101 SET character_set_client = @saved_cs_client */;
9 /*!40101 SET @saved_cs_client = @@character_set_client */; 9 /*!40101 SET @saved_cs_client = @@character_set_client */;
10 /*!40101 SET character_set_client = utf8 */; 10 /*!40101 SET character_set_client = utf8 */;
11 CREATE TABLE `users` ( 11 CREATE TABLE `users` (
12 `id` varchar(40) NOT NULL, 12 `id` varchar(40) NOT NULL,
13 `reports` int(10) unsigned NOT NULL DEFAULT '0', 13 `reports` int(10) unsigned NOT NULL DEFAULT '0',
14 `positive` int(10) unsigned NOT NULL DEFAULT '0', 14 `positive` int(10) unsigned NOT NULL DEFAULT '0',
15 `negative` int(10) unsigned NOT NULL DEFAULT '0', 15 `negative` int(10) unsigned NOT NULL DEFAULT '0',
16 `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTA MP,
16 PRIMARY KEY (`id`) 17 PRIMARY KEY (`id`)
17 ) DEFAULT CHARSET=utf8; 18 ) DEFAULT CHARSET=utf8;
18 /*!40101 SET character_set_client = @saved_cs_client */; 19 /*!40101 SET character_set_client = @saved_cs_client */;
19 /*!40101 SET @saved_cs_client = @@character_set_client */; 20 /*!40101 SET @saved_cs_client = @@character_set_client */;
20 /*!40101 SET character_set_client = utf8 */; 21 /*!40101 SET character_set_client = utf8 */;
21 CREATE TABLE `reports` ( 22 CREATE TABLE `reports` (
22 `guid` varchar(40) NOT NULL, 23 `guid` varchar(40) NOT NULL,
23 `type` varchar(30) DEFAULT NULL, 24 `type` varchar(30) DEFAULT NULL,
24 `ctime` datetime NOT NULL, 25 `ctime` datetime NOT NULL,
25 `site` varchar(150) DEFAULT NULL, 26 `site` varchar(150) DEFAULT NULL,
(...skipping 14 matching lines...) Expand all
40 CREATE TABLE `sublists` ( 41 CREATE TABLE `sublists` (
41 `report` varchar(40) NOT NULL, 42 `report` varchar(40) NOT NULL,
42 `list` int(10) unsigned NOT NULL, 43 `list` int(10) unsigned NOT NULL,
43 `hasmatches` tinyint(1) NOT NULL DEFAULT '0', 44 `hasmatches` tinyint(1) NOT NULL DEFAULT '0',
44 UNIQUE KEY `report_list` (`list`,`report`), 45 UNIQUE KEY `report_list` (`list`,`report`),
45 KEY `sublists_report` (`report`), 46 KEY `sublists_report` (`report`),
46 CONSTRAINT `sublists_report` FOREIGN KEY (`report`) REFERENCES `reports` (`gui d`) ON DELETE CASCADE ON UPDATE CASCADE, 47 CONSTRAINT `sublists_report` FOREIGN KEY (`report`) REFERENCES `reports` (`gui d`) ON DELETE CASCADE ON UPDATE CASCADE,
47 CONSTRAINT `sublists_list` FOREIGN KEY (`list`) REFERENCES `subscriptions` (`i d`) ON DELETE CASCADE ON UPDATE CASCADE 48 CONSTRAINT `sublists_list` FOREIGN KEY (`list`) REFERENCES `subscriptions` (`i d`) ON DELETE CASCADE ON UPDATE CASCADE
48 ) DEFAULT CHARSET=utf8; 49 ) DEFAULT CHARSET=utf8;
49 /*!40101 SET character_set_client = @saved_cs_client */; 50 /*!40101 SET character_set_client = @saved_cs_client */;
OLDNEW
« sitescripts/reports/bin/removeOldUsers.py ('K') | « sitescripts/reports/bin/removeOldUsers.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld