r22874 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22873‎ | r22874 | r22875 >
Date:23:19, 9 June 2007
Author:robchurch
Status:old
Tags:
Comment:
* Fix updater, Database::sourceStream() is a bit bonkers
* Update table definition
Modified paths:
  • /branches/robchurch/newtalk/maintenance/archives/patch-fix-newtalk.sql (modified) (history)
  • /branches/robchurch/newtalk/maintenance/tables.sql (modified) (history)

Diff [purge]

Index: branches/robchurch/newtalk/maintenance/archives/patch-fix-newtalk.sql
@@ -1,9 +1,7 @@
22 -- Alters columns in `user_newtalk` to be nullable and
33 -- drops existing indices in favour of a single UNIQUE
44 -- index
5 -ALTER TABLE /*wgDBprefix*/user_newtalk
6 -DROP INDEX `user_id`,
7 -DROP INDEX `user_ip`,
8 -CHANGE `user_id` `user_id` INT(5) NULL,
 5+ALTER TABLE /*$wgDBprefix*/user_newtalk DROP INDEX `user_id`,
 6+DROP INDEX `user_ip`, CHANGE `user_id` `user_id` INT(5) NULL,
97 CHANGE `user_ip` `user_ip` VARCHAR(40) NULL,
10 -ADD UNIQUE( `user_id`, `user_ip` )
 8+ADD UNIQUE( `user_id`, `user_ip` );
\ No newline at end of file
Index: branches/robchurch/newtalk/maintenance/tables.sql
@@ -161,17 +161,16 @@
162162 -- Stores notifications of user talk page changes, for the display
163163 -- of the "you have new messages" box
164164 CREATE TABLE /*$wgDBprefix*/user_newtalk (
165 - -- Key to user.user_id
166 - user_id int(5) NOT NULL default '0',
167 - -- If the user is an anonymous user their IP address is stored here
168 - -- since the user_id of 0 is ambiguous
169 - user_ip varchar(40) NOT NULL default '',
170 - INDEX user_id (user_id),
171 - INDEX user_ip (user_ip)
172165
 166+ -- User identifier if it's a registered account
 167+ user_id INT(5) NULL,
 168+ -- IP address if it's not a registered account
 169+ user_ip VARCHAR(40) NULL,
 170+
 171+ UNIQUE( `user_ip` )
 172+
173173 ) /*$wgDBTableOptions*/;
174174
175 -
176175 --
177176 -- Core of the wiki: each page has an entry here which identifies
178177 -- it by title and contains some essential metadata.

Status & tagging log