Add missing uploadstash.us_props for PostgreSQL
authorsaper <saper@saper.info>
Fri, 6 Dec 2013 17:22:36 +0000 (18:22 +0100)
committersaper <saper@saper.info>
Mon, 9 Dec 2013 19:46:17 +0000 (20:46 +0100)
This field was introduced in e5d41cca909a8ec1b19c6c080388c885854be3f7
but only for MySQL.

Change-Id: I057b1dd845a5ab7ae05f5597454981a6e2c12698

includes/installer/PostgresUpdater.php
includes/upload/UploadStash.php
maintenance/postgres/tables.sql

index e8a1c80..dd07bc2 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 d0d1e92..37c8cf6 100644 (file)
@@ -376,6 +376,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,