r100640 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100639‎ | r100640 | r100641 >
Date:19:43, 24 October 2011
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Update Postgres with missing uploadstash tables
Modified paths:
  • /trunk/phase3/includes/installer/PostgresUpdater.php (modified) (history)
  • /trunk/phase3/maintenance/postgres/archives/patch-uploadstash.sql (added) (history)
  • /trunk/phase3/maintenance/postgres/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/postgres/archives/patch-uploadstash.sql
@@ -0,0 +1,24 @@
 2+CREATE SEQUENCE us_id_seq;
 3+CREATE TYPE media_type AS ENUM ('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE');
 4+
 5+CREATE TABLE uploadstash (
 6+ us_id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('us_id_seq'),
 7+ us_user INTEGER,
 8+ us_key TEXT,
 9+ us_orig_path TEXT,
 10+ us_path TEXT,
 11+ us_source_type TEXT,
 12+ us_timestamp TIMESTAMPTZ,
 13+ us_status TEXT,
 14+ us_size INTEGER,
 15+ us_sha1 TEXT,
 16+ us_mime TEXT,
 17+ us_media_type media_type DEFAULT NULL,
 18+ us_image_width INTEGER,
 19+ us_image_height INTEGER,
 20+ us_image_bits INTEGER
 21+);
 22+
 23+CREATE INDEX us_user_idx ON uploadstash (us_user);
 24+CREATE UNIQUE INDEX us_key_idx ON uploadstash (us_key);
 25+CREATE INDEX us_timestamp_idx ON uploadstash (us_timestamp);
Property changes on: trunk/phase3/maintenance/postgres/archives/patch-uploadstash.sql
___________________________________________________________________
Added: svn:eol-style
126 + native
Index: trunk/phase3/maintenance/postgres/tables.sql
@@ -358,7 +358,32 @@
359359 CREATE INDEX fa_notime ON filearchive (fa_deleted_timestamp);
360360 CREATE INDEX fa_nouser ON filearchive (fa_deleted_user);
361361
 362+CREATE SEQUENCE us_id_seq;
 363+CREATE TYPE media_type AS ENUM ('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE');
362364
 365+CREATE TABLE uploadstash (
 366+ us_id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('us_id_seq'),
 367+ us_user INTEGER,
 368+ us_key TEXT,
 369+ us_orig_path TEXT,
 370+ us_path TEXT,
 371+ us_source_type TEXT,
 372+ us_timestamp TIMESTAMPTZ,
 373+ us_status TEXT,
 374+ us_size INTEGER,
 375+ us_sha1 TEXT,
 376+ us_mime TEXT,
 377+ us_media_type media_type DEFAULT NULL,
 378+ us_image_width INTEGER,
 379+ us_image_height INTEGER,
 380+ us_image_bits INTEGER
 381+);
 382+
 383+CREATE INDEX us_user_idx ON uploadstash (us_user);
 384+CREATE UNIQUE INDEX us_key_idx ON uploadstash (us_key);
 385+CREATE INDEX us_timestamp_idx ON uploadstash (us_timestamp);
 386+
 387+
363388 CREATE SEQUENCE recentchanges_rc_id_seq;
364389 CREATE TABLE recentchanges (
365390 rc_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('recentchanges_rc_id_seq'),
Index: trunk/phase3/includes/installer/PostgresUpdater.php
@@ -54,6 +54,7 @@
5555 array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
5656 array( 'addTable', 'msg_resource_links','patch-msg_resource_links.sql' ),
5757 array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
 58+ array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
5859
5960 # Needed before new field
6061 array( 'convertArchive2' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r100641Add user_former_groups table to PG updateroverlordq19:55, 24 October 2011
r103365Followup to r100640, use correct name scheme for sequence, correct references...overlordq19:54, 16 November 2011
r105349MFT r100640, r103365, r103367 - uploadstash table was missing from postgresqlbrion20:49, 6 December 2011
r107907MFT r100348, r100640, r101656, r101867, r101869m r104030reedy17:34, 3 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   07:37, 25 October 2011

Mixes spaces and tabs.

#Comment by OverlordQ (talk | contribs)   23:59, 25 October 2011

Fixed in the next revision

#Comment by Brion VIBBER (talk | contribs)   20:18, 6 December 2011

Needs merging to 1.18: bug 32822.

Status & tagging log