From: Demon Date: Wed, 4 Apr 2012 13:48:14 +0000 (-0400) Subject: Postgres updater: add config table, adjust us_image_bits type X-Git-Tag: 1.31.0-rc.0~24037^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=b2a3c87792431c9246c5c6b1d549db3b994d7c33;p=lhc%2Fweb%2Fwiklou.git Postgres updater: add config table, adjust us_image_bits type This is a followup to I18e67bcb, that I failed to notice before merging Change-Id: Ia96f831f279b0f6a348f1db80ecf30298ecf064c --- diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 9a982f9f5f..f5f8c41b14 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -68,6 +68,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ), array( 'addTable', 'user_former_groups','patch-user_former_groups.sql' ), + array( 'addTable', 'config', 'patch-config.sql' ), # Needed before new field array( 'convertArchive2' ), @@ -169,6 +170,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'changeField', 'revision', 'rev_minor_edit', 'smallint', 'rev_minor_edit::smallint DEFAULT 0' ), array( 'changeField', 'templatelinks', 'tl_namespace', 'smallint', 'tl_namespace::smallint' ), array( 'changeField', 'user_newtalk', 'user_ip', 'text', 'host(user_ip)' ), + array( 'changeField', 'uploadstash', 'us_image_bits', 'smallint', '' ), # null changes array( 'changeNullableField', 'oldimage', 'oi_bits', 'NULL' ), diff --git a/maintenance/postgres/archives/patch-config.sql b/maintenance/postgres/archives/patch-config.sql new file mode 100644 index 0000000000..2f39ff050a --- /dev/null +++ b/maintenance/postgres/archives/patch-config.sql @@ -0,0 +1,5 @@ +CREATE TABLE config ( + cf_name TEXT NOT NULL PRIMARY KEY, + cf_value TEXT NOT NULL +); +CREATE INDEX cf_name_value ON config (cf_name, cf_value); \ No newline at end of file