From 52fd34bc033f66404d47fdb3a744f94a478d0489 Mon Sep 17 00:00:00 2001 From: Paladox Date: Wed, 19 Oct 2016 11:26:58 +0100 Subject: [PATCH] Add dropSequence to postgres This is how to set it [ 'dropSequence', 'logging', 'logging_log_id_seq' ] for example Change-Id: I567287703310eff2e9e3cde8f2423dbf5e990a4b --- includes/installer/PostgresUpdater.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 39cb89cd49..99569ea41d 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -626,6 +626,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" ); -- 2.20.1