From: Alexandre Emsenhuber Date: Thu, 17 Mar 2011 17:35:52 +0000 (+0000) Subject: Per Tim Starling, follow-up r83137: added schema update X-Git-Tag: 1.31.0-rc.0~31362 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=d3e1383071e3fc230caa58c2abd526a9108883f7;p=lhc%2Fweb%2Fwiklou.git Per Tim Starling, follow-up r83137: added schema update --- diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index db9f9c5944..f33983a16e 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -176,6 +176,9 @@ class MysqlUpdater extends DatabaseUpdater { array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ), array( 'doLangLinksLengthUpdate' ), array( 'doClTypeVarcharUpdate' ), + + // 1.18 + array( 'doUserNewTalkTimestampNotNull' ), ); } @@ -843,4 +846,16 @@ class MysqlUpdater extends DatabaseUpdater { $this->output( "...cl_type is up-to-date.\n" ); } } + + protected function doUserNewTalkTimestampNotNull() { + $info = $this->db->fieldInfo( 'user_newtalk', 'user_last_timestamp' ); + if ( $info->isNullable() ) { + $this->output( "...user_last_timestamp is already nullable.\n" ); + return; + } + + $this->output( "Making user_last_timestamp nullable... " ); + $this->applyPatch( 'patch-user-newtalk-timestamp-null.sql' ); + $this->output( "done.\n" ); + } } diff --git a/maintenance/archives/patch-user-newtalk-timestamp-null.sql b/maintenance/archives/patch-user-newtalk-timestamp-null.sql new file mode 100644 index 0000000000..7234362d4b --- /dev/null +++ b/maintenance/archives/patch-user-newtalk-timestamp-null.sql @@ -0,0 +1 @@ +ALTER TABLE /*_*/user_newtalk MODIFY user_last_timestamp varbinary(14) NULL default NULL;