r22876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22875‎ | r22876 | r22877 >
Date:23:30, 9 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Tentative upgrader for PostgreSQL
Modified paths:
  • /branches/robchurch/newtalk/maintenance/postgres/archives/patch-fix-newtalk.sql (added) (history)
  • /branches/robchurch/newtalk/maintenance/postgres/tables.sql (modified) (history)

Diff [purge]

Index: branches/robchurch/newtalk/maintenance/postgres/archives/patch-fix-newtalk.sql
@@ -0,0 +1,8 @@
 2+-- Alters columns in `user_newtalk` to be nullable and
 3+-- drops existing indices in favour of a single UNIQUE
 4+-- index
 5+ALTER TABLE user_newtalk DROP INDEX user_newtalk_id_idx,
 6+DROP INDEX user_newtalk_ip_idx, ALTER user_id DROP NOT NULL,
 7+ALTER user_ip DROP NOT NULL;
 8+
 9+CREATE UNIQUE INDEX user_newtalk_unique ON user_newtalk ( user_id, user_ip );
\ No newline at end of file
Property changes on: branches/robchurch/newtalk/maintenance/postgres/archives/patch-fix-newtalk.sql
___________________________________________________________________
Added: svn:eol-style
110 + native
Index: branches/robchurch/newtalk/maintenance/postgres/tables.sql
@@ -41,13 +41,11 @@
4242 CREATE UNIQUE INDEX user_groups_unique ON user_groups (ug_user, ug_group);
4343
4444 CREATE TABLE user_newtalk (
45 - user_id INTEGER NOT NULL REFERENCES mwuser(user_id) ON DELETE CASCADE,
 45+ user_id INTEGER NULL REFERENCES mwuser(user_id) ON DELETE CASCADE,
4646 user_ip TEXT NULL
4747 );
48 -CREATE INDEX user_newtalk_id_idx ON user_newtalk (user_id);
49 -CREATE INDEX user_newtalk_ip_idx ON user_newtalk (user_ip);
 48+CREATE UNIQUE INDEX user_newtalk_unique ON user_newtalk(user_id, user_ip);
5049
51 -
5250 CREATE SEQUENCE page_page_id_seq;
5351 CREATE TABLE page (
5452 page_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('page_page_id_seq'),

Status & tagging log