| Index: trunk/phase3/includes/installer/PostgresUpdater.php |
| — | — | @@ -16,6 +16,11 @@ |
| 17 | 17 | class PostgresUpdater extends DatabaseUpdater { |
| 18 | 18 | |
| 19 | 19 | /** |
| | 20 | + * @var DatabasePostgres |
| | 21 | + */ |
| | 22 | + protected $db; |
| | 23 | + |
| | 24 | + /** |
| 20 | 25 | * @todo FIXME: Postgres should use sequential updates like Mysql, Sqlite |
| 21 | 26 | * and everybody else. It never got refactored like it should've. |
| 22 | 27 | */ |
| — | — | @@ -390,6 +395,10 @@ |
| 391 | 396 | } |
| 392 | 397 | |
| 393 | 398 | protected function renameSequence( $old, $new ) { |
| | 399 | + if ( $this->db->sequenceExists( $new ) ) { |
| | 400 | + $this->output( "WARNING sequence $new already exists\n" ); |
| | 401 | + return; |
| | 402 | + } |
| 394 | 403 | if ( $this->db->sequenceExists( $old ) ) { |
| 395 | 404 | $this->output( "Renaming sequence $old to $new\n" ); |
| 396 | 405 | $this->db->query( "ALTER SEQUENCE $old RENAME TO $new" ); |