diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index e8a1c80570c..dd07bc26c53 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -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', '' ), diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 7db6c64b368..ea11737811f 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -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'], diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index d0d1e92de8b..37c8cf6f2f8 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -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,