From de98a2ab54920a3a546435864762913201b13c54 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 1 Feb 2011 18:58:32 +0000 Subject: [PATCH] Followup r81311, add MysqlUpdater function to update ll_lang length if it's still 10 --- includes/installer/MysqlUpdater.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 5cfd628d91..db101dada3 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -173,6 +173,7 @@ class MysqlUpdater extends DatabaseUpdater { array( 'addTable', 'module_deps', 'patch-module_deps.sql' ), array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ), array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ), + array( 'doLangLinksLengthUpdate' ), ); } @@ -813,4 +814,18 @@ class MysqlUpdater extends DatabaseUpdater { $this->applyPatch( 'patch-categorylinks-better-collation2.sql' ); $this->output( "done.\n" ); } + + protected function doLangLinksLengthUpdate() { + $langlinks = $this->db->tableName( 'langlinks' ); + $res = $this->db->query( "SHOW COLUMNS FROM $langlinks LIKE 'll_lang'" ); + $row = $this->db->fetchObject( $res ); + + if ( $row && $row->Type == "varbinary(210)" ) { + $this->output( 'Updating length of ll_lang in langlinks...' ); + $this->applyPatch( 'patch-langlinks-ll_lang-20.sql' ); + $this->output( "done.\n" ); + } else { + $this->output( "...ll_lang is up-to-date.\n" ); + } + } } -- 2.20.1