Merge "xhprof: Guard against division by 0 when computing percentages"
[lhc/web/wiklou.git] / includes / installer / PostgresUpdater.php
index e8de7de..9e8ee94 100644 (file)
@@ -414,6 +414,10 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'addPgField', 'page_props', 'pp_sortkey', 'float NULL' ),
                        array( 'addPgIndex', 'page_props', 'pp_propname_sortkey_page',
                                        '( pp_propname, pp_sortkey, pp_page ) WHERE ( pp_sortkey IS NOT NULL )' ),
+                       array( 'addPgField', 'page', 'page_lang', 'TEXT default NULL' ),
+                       array( 'addPgField', 'pagelinks', 'pl_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
+                       array( 'addPgField', 'templatelinks', 'tl_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
+                       array( 'addPgField', 'imagelinks', 'il_from_namespace', 'INTEGER NOT NULL DEFAULT 0' ),
                );
        }
 
@@ -693,7 +697,7 @@ END;
                        $this->output( "...column '$table.$field' is already of type '$newtype'\n" );
                } else {
                        $this->output( "Purging data from cache table '$table'\n" );
-                       $this->db->query("DELETE from $table" );
+                       $this->db->query( "DELETE from $table" );
                        $this->output( "Changing column type of '$table.$field' from '{$fi->type()}' to '$newtype'\n" );
                        $sql = "ALTER TABLE $table ALTER $field TYPE $newtype";
                        if ( strlen( $default ) ) {