From: Aaron Schulz Date: Wed, 2 May 2007 17:23:25 +0000 (+0000) Subject: *For non-postgres, add the pr_id right after adding page_restrictions table to avoid... X-Git-Tag: 1.31.0-rc.0~53119 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=67e880b5ab4df624a2f2d4b7acc20d7a63142804;p=lhc%2Fweb%2Fwiklou.git *For non-postgres, add the pr_id right after adding page_restrictions table to avoid needing to run update.php twice --- diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index b5bc2ecc44..ff36875a37 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -960,16 +960,19 @@ function do_restrictions_update() { # Migrating old restrictions to new table # -- Andrew Garrett, January 2007. - global $wgDatabase; + global $wgDatabase, $wgDBtype; $name = 'page_restrictions'; $patch = 'patch-page_restrictions.sql'; + $patch2 = 'patch-page_restrictions_sortkey.sql'; if ( $wgDatabase->tableExists( $name ) ) { echo "...$name table already exists.\n"; } else { echo "Creating $name table..."; dbsource( archive($patch), $wgDatabase ); + if ( $wgDBtype !="postgres" ) + dbsource( archive($patch2), $wgDatabase ); echo "ok\n"; echo "Migrating old restrictions to new table...";