Make user_ip in user_newtalk a TEXT, as it is not an IP field.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Wed, 7 Feb 2007 18:47:04 +0000 (18:47 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Wed, 7 Feb 2007 18:47:04 +0000 (18:47 +0000)
maintenance/postgres/tables.sql
maintenance/updaters.inc

index 4dca3b1..62e021e 100644 (file)
@@ -42,7 +42,7 @@ CREATE UNIQUE INDEX user_groups_unique ON user_groups (ug_user, ug_group);
 
 CREATE TABLE user_newtalk (
   user_id  INTEGER NOT NULL  REFERENCES mwuser(user_id) ON DELETE CASCADE,
-  user_ip  CIDR        NULL
+  user_ip  TEXT        NULL
 );
 CREATE INDEX user_newtalk_id_idx ON user_newtalk (user_id);
 CREATE INDEX user_newtalk_ip_idx ON user_newtalk (user_ip);
index 454f082..99cd39c 100644 (file)
@@ -1222,6 +1222,8 @@ DO INSTEAD DELETE FROM archive2 a2 WHERE
   a2.ar_namespace = OLD.ar_namespace AND
   a2.ar_rev_id = OLD.ar_rev_id;
 
+-- Another misleadingly named column! :)
+ALTER TABLE user_newtalk ALTER user_ip TYPE TEXT USING host(user_ip);
 
 -- Note this upgrade
 INSERT INTO mediawiki_version (type,mw_version,notes)