From c876d841c211692e39d99e39efc1dd20137cbc08 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 12 Oct 2007 00:40:58 +0000 Subject: [PATCH] Make filarchive width/height columns ints for Postgres (not smallint) --- RELEASE-NOTES | 2 +- maintenance/postgres/tables.sql | 4 ++-- maintenance/updaters.inc | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2ba18eb98e..a7b483da13 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -100,7 +100,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11629) If $wgEmailConfirmToEdit is true, require people to supply an email address when registering. * (bug 11612) Days to show in recent changes cannot be larger than 7 - +* (bug 11131) Change filearchive width/height columns to int for Postgres === API changes in 1.12 === diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 5f925b6656..ef88503020 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -292,8 +292,8 @@ CREATE TABLE filearchive ( fa_deleted_timestamp TIMESTAMPTZ NOT NULL, fa_deleted_reason TEXT, fa_size INTEGER NOT NULL, - fa_width SMALLINT NOT NULL, - fa_height SMALLINT NOT NULL, + fa_width INTEGER NOT NULL, + fa_height INTEGER NOT NULL, fa_metadata BYTEA NOT NULL DEFAULT '', fa_bits SMALLINT, fa_media_type TEXT, diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index fe9328115f..9069d6415a 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -1365,8 +1365,10 @@ function do_postgres_updates() { $typechanges = array( array("archive", "ar_deleted", "smallint", ""), array("filearchive", "fa_deleted", "smallint", ""), + array("filearchive", "fa_height", "integer", ""), array("filearchive", "fa_metadata", "bytea", "decode(fa_metadata,'escape')"), array("filearchive", "fa_size", "integer", ""), + array("filearchive", "fa_width", "integer", ""), array("filearchive", "fa_storage_group","text", ""), array("filearchive", "fa_storage_key", "text", ""), array("image", "img_metadata", "bytea", "decode(img_metadata,'escape')"), -- 2.20.1