From 67e880b5ab4df624a2f2d4b7acc20d7a63142804 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 2 May 2007 17:23:25 +0000 Subject: [PATCH] *For non-postgres, add the pr_id right after adding page_restrictions table to avoid needing to run update.php twice --- maintenance/updaters.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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..."; -- 2.20.1