From: Platonides Date: Wed, 11 Aug 2010 16:50:31 +0000 (+0000) Subject: Move things along the DROP TABLE. X-Git-Tag: 1.31.0-rc.0~35548 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=637cf8a3371c5655d540fbc81f90c2fc7d3828f2;p=lhc%2Fweb%2Fwiklou.git Move things along the DROP TABLE. --- diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 6a5f657e96..54c42fee1f 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -656,7 +656,14 @@ class ParserTest { $this->changePrefix( $wgDBtype != 'oracle' ? 'parsertest_' : 'pt_' ); $newTableName = $db->tableName( $tbl ); - if ( $db->tableExists( $tbl ) && $wgDBtype != 'postgres' && $wgDBtype != 'oracle' ) { + if ( $wgDBtype == 'mysql' ) { + $db->query( "DROP TABLE IF EXISTS $newTableName" ); + } elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) { + /* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669) + * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That + * syntax would also work for mysql. + */ + } elseif ( $db->tableExists( $tbl ) ) { $db->query( "DROP TABLE $newTableName" ); } # Create new table