Merge "Add tags for undo edits"
[lhc/web/wiklou.git] / includes / installer / PostgresUpdater.php
index 1f17fec..393c2e1 100644 (file)
@@ -481,7 +481,8 @@ class PostgresUpdater extends DatabaseUpdater {
                        [ 'changeNullableField', 'protected_titles', 'pt_reason', 'NOT NULL', true ],
                        [ 'addPgField', 'protected_titles', 'pt_reason_id', 'INTEGER NOT NULL DEFAULT 0' ],
                        [ 'addTable', 'comment', 'patch-comment-table.sql' ],
-                       [ 'addIndex', 'site_stats', 'PRIMARY', 'patch-site_stats-pk.sql' ],
+                       [ 'addIndex', 'site_stats', 'site_stats_pkey', 'patch-site_stats-pk.sql' ],
+                       [ 'addTable', 'ip_changes', 'patch-ip_changes.sql' ],
                ];
        }
 
@@ -656,6 +657,13 @@ END;
                }
        }
 
+       protected function dropSequence( $table, $ns ) {
+               if ( $this->db->sequenceExists( $ns ) ) {
+                       $this->output( "Dropping sequence $ns\n" );
+                       $this->db->query( "DROP SEQUENCE $ns CASCADE" );
+               }
+       }
+
        protected function renameSequence( $old, $new ) {
                if ( $this->db->sequenceExists( $new ) ) {
                        $this->output( "...sequence $new already exists.\n" );