From: saper Date: Fri, 6 Dec 2013 17:22:36 +0000 (+0100) Subject: Add missing uploadstash.us_props for PostgreSQL X-Git-Tag: 1.31.0-rc.0~17096^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=c7f4586fe1e405e5ad8e4e504b024248a36eef57;p=lhc%2Fweb%2Fwiklou.git Add missing uploadstash.us_props for PostgreSQL This field was introduced in e5d41cca909a8ec1b19c6c080388c885854be3f7 but only for MySQL. Change-Id: I057b1dd845a5ab7ae05f5597454981a6e2c12698 --- diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index e8a1c80570..dd07bc26c5 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 7db6c64b36..ea11737811 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 d0d1e92de8..37c8cf6f2f 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,