Merge "Add missing uploadstash.us_props for PostgreSQL"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 29 Jan 2014 18:19:48 +0000 (18:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Jan 2014 18:19:48 +0000 (18:19 +0000)
includes/installer/PostgresUpdater.php
includes/upload/UploadStash.php
maintenance/postgres/tables.sql

index fa58a62..cd5a8ad 100644 (file)
@@ -169,6 +169,7 @@ class PostgresUpdater extends DatabaseUpdater {
                                "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('archive_ar_id_seq')" ),
                        array( 'addPgField', 'externallinks', 'el_id',
                                "INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('externallinks_el_id_seq')" ),
+                       array( 'addPgField', 'uploadstash', 'us_props', "BYTEA" ),
 
                        # type changes
                        array( 'changeField', 'archive', 'ar_deleted', 'smallint', '' ),
index 7db6c64..ea11737 100644 (file)
@@ -260,7 +260,7 @@ class UploadStash {
                        'us_key' => $key,
                        'us_orig_path' => $path,
                        'us_path' => $stashPath, // virtual URL
-                       'us_props' => serialize( $fileProps ),
+                       'us_props' => $dbw->encodeBlob( serialize( $fileProps ) ),
                        'us_size' => $fileProps['size'],
                        'us_sha1' => $fileProps['sha1'],
                        'us_mime' => $fileProps['mime'],
index 93e931c..3aa8109 100644 (file)
@@ -377,6 +377,7 @@ CREATE TABLE uploadstash (
   us_key          TEXT,
   us_orig_path    TEXT,
   us_path         TEXT,
+  us_props        BYTEA,
   us_source_type  TEXT,
   us_timestamp    TIMESTAMPTZ,
   us_status       TEXT,