r98316 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98315‎ | r98316 | r98317 >
Date:15:33, 28 September 2011
Author:reedy
Status:deferred
Tags:
Comment:
Add source column to offline table

Queries to change existing tables:

ALTER TABLE offline ADD COLUMN source varchar (255) AFTER date;

ALTER TABLE offline DROP PRIMARY KEY;

ALTER TABLE offline ADD PRIMARY KEY(date, source);
Modified paths:
  • /trunk/wikistats/analytics/analytics_create_and_load_from_csv.txt (modified) (history)

Diff [purge]

Index: trunk/wikistats/analytics/analytics_create_and_load_from_csv.txt
@@ -101,9 +101,10 @@
102102 ) ;
103103
104104 CREATE TABLE `offline` (
105 - `date` date NOT NULL,
 105+ `date` date NOT NULL,
 106+ `source` varchar (255),
106107 `readers` bigint (12),
107 - PRIMARY KEY (date,readers)
 108+ PRIMARY KEY (date,source)
108109 ) ;
109110
110111 -- SHOW TABLES ;

Status & tagging log