Index: trunk/phase3/includes/installer/PostgresUpdater.php |
— | — | @@ -394,7 +394,7 @@ |
395 | 395 | |
396 | 396 | protected function renameSequence( $old, $new ) { |
397 | 397 | if ( $this->db->sequenceExists( $new ) ) { |
398 | | - $this->output( "WARNING sequence $new already exists\n" ); |
| 398 | + $this->output( "...sequence $new already exists.\n" ); |
399 | 399 | return; |
400 | 400 | } |
401 | 401 | if ( $this->db->sequenceExists( $old ) ) { |
— | — | @@ -414,7 +414,7 @@ |
415 | 415 | protected function addPgField( $table, $field, $type ) { |
416 | 416 | $fi = $this->db->fieldInfo( $table, $field ); |
417 | 417 | if ( !is_null( $fi ) ) { |
418 | | - $this->output( "... column '$table.$field' already exists\n" ); |
| 418 | + $this->output( "...column '$table.$field' already exists\n" ); |
419 | 419 | return; |
420 | 420 | } else { |
421 | 421 | $this->output( "Adding column '$table.$field'\n" ); |
— | — | @@ -425,12 +425,12 @@ |
426 | 426 | protected function changeField( $table, $field, $newtype, $default ) { |
427 | 427 | $fi = $this->db->fieldInfo( $table, $field ); |
428 | 428 | if ( is_null( $fi ) ) { |
429 | | - $this->output( "... error: expected column $table.$field to exist\n" ); |
| 429 | + $this->output( "...ERROR: expected column $table.$field to exist\n" ); |
430 | 430 | exit( 1 ); |
431 | 431 | } |
432 | 432 | |
433 | 433 | if ( $fi->type() === $newtype ) |
434 | | - $this->output( "... column '$table.$field' is already of type '$newtype'\n" ); |
| 434 | + $this->output( "...column '$table.$field' is already of type '$newtype'\n" ); |
435 | 435 | else { |
436 | 436 | $this->output( "Changing column type of '$table.$field' from '{$fi->type()}' to '$newtype'\n" ); |
437 | 437 | $sql = "ALTER TABLE $table ALTER $field TYPE $newtype"; |
— | — | @@ -452,7 +452,7 @@ |
453 | 453 | protected function changeNullableField( $table, $field, $null ) { |
454 | 454 | $fi = $this->db->fieldInfo( $table, $field ); |
455 | 455 | if ( is_null( $fi ) ) { |
456 | | - $this->output( "... error: expected column $table.$field to exist\n" ); |
| 456 | + $this->output( "...ERROR: expected column $table.$field to exist\n" ); |
457 | 457 | exit( 1 ); |
458 | 458 | } |
459 | 459 | if ( $fi->isNullable() ) { |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | $this->output( "Changing '$table.$field' to not allow NULLs\n" ); |
463 | 463 | $this->db->query( "ALTER TABLE $table ALTER $field SET NOT NULL" ); |
464 | 464 | } else { |
465 | | - $this->output( "... column '$table.$field' is already set as NULL\n" ); |
| 465 | + $this->output( "...column '$table.$field' is already set as NULL\n" ); |
466 | 466 | } |
467 | 467 | } else { |
468 | 468 | # # It's NOT NULL - does it need to be NULL? |
— | — | @@ -470,14 +470,14 @@ |
471 | 471 | $this->db->query( "ALTER TABLE $table ALTER $field DROP NOT NULL" ); |
472 | 472 | } |
473 | 473 | else { |
474 | | - $this->output( "... column '$table.$field' is already set as NOT NULL\n" ); |
| 474 | + $this->output( "...column '$table.$field' is already set as NOT NULL\n" ); |
475 | 475 | } |
476 | 476 | } |
477 | 477 | } |
478 | 478 | |
479 | 479 | public function addPgIndex( $table, $index, $type ) { |
480 | 480 | if ( $this->db->indexExists( $table, $index ) ) { |
481 | | - $this->output( "... index '$index' on table '$table' already exists\n" ); |
| 481 | + $this->output( "...index '$index' on table '$table' already exists\n" ); |
482 | 482 | } else { |
483 | 483 | $this->output( "Creating index '$index' on table '$table' $type\n" ); |
484 | 484 | $this->db->query( "CREATE INDEX $index ON $table $type" ); |
— | — | @@ -486,7 +486,7 @@ |
487 | 487 | |
488 | 488 | public function addPgExtIndex( $table, $index, $type ) { |
489 | 489 | if ( $this->db->indexExists( $table, $index ) ) { |
490 | | - $this->output( "... index '$index' on table '$table' already exists\n" ); |
| 490 | + $this->output( "...index '$index' on table '$table' already exists\n" ); |
491 | 491 | } else { |
492 | 492 | $this->output( "Creating index '$index' on table '$table'\n" ); |
493 | 493 | if ( preg_match( '/^\(/', $type ) ) { |
— | — | @@ -527,7 +527,7 @@ |
528 | 528 | } |
529 | 529 | $this->applyPatch( 'patch-remove-archive2.sql' ); |
530 | 530 | } else { |
531 | | - $this->output( "... obsolete table 'archive2' does not exist\n" ); |
| 531 | + $this->output( "...obsolete table 'archive2' does not exist\n" ); |
532 | 532 | } |
533 | 533 | } |
534 | 534 | |
— | — | @@ -538,13 +538,13 @@ |
539 | 539 | $this->db->query( "ALTER TABLE oldimage ALTER oi_deleted TYPE SMALLINT USING (oi_deleted::smallint)" ); |
540 | 540 | $this->db->query( "ALTER TABLE oldimage ALTER oi_deleted SET DEFAULT 0" ); |
541 | 541 | } else { |
542 | | - $this->output( "... column 'oldimage.oi_deleted' is already of type 'smallint'\n" ); |
| 542 | + $this->output( "...column 'oldimage.oi_deleted' is already of type 'smallint'\n" ); |
543 | 543 | } |
544 | 544 | } |
545 | 545 | |
546 | 546 | protected function checkOiNameConstraint() { |
547 | 547 | if ( $this->db->hasConstraint( "oldimage_oi_name_fkey_cascaded" ) ) { |
548 | | - $this->output( "... table 'oldimage' has correct cascading delete/update foreign key to image\n" ); |
| 548 | + $this->output( "...table 'oldimage' has correct cascading delete/update foreign key to image\n" ); |
549 | 549 | } else { |
550 | 550 | if ( $this->db->hasConstraint( "oldimage_oi_name_fkey" ) ) { |
551 | 551 | $this->db->query( "ALTER TABLE oldimage DROP CONSTRAINT oldimage_oi_name_fkey" ); |
— | — | @@ -563,7 +563,7 @@ |
564 | 564 | $this->output( "Adding function and trigger 'page_deleted' to table 'page'\n" ); |
565 | 565 | $this->applyPatch( 'patch-page_deleted.sql' ); |
566 | 566 | } else { |
567 | | - $this->output( "... table 'page' has 'page_deleted' trigger\n" ); |
| 567 | + $this->output( "...table 'page' has 'page_deleted' trigger\n" ); |
568 | 568 | } |
569 | 569 | } |
570 | 570 | |
— | — | @@ -573,7 +573,7 @@ |
574 | 574 | $this->output( "Removing NOT NULL constraint from 'recentchanges.rc_cur_id'\n" ); |
575 | 575 | $this->applyPatch( 'patch-rc_cur_id-not-null.sql' ); |
576 | 576 | } else { |
577 | | - $this->output( "... column 'recentchanges.rc_cur_id' has a NOT NULL constraint\n" ); |
| 577 | + $this->output( "...column 'recentchanges.rc_cur_id' has a NOT NULL constraint\n" ); |
578 | 578 | } |
579 | 579 | } |
580 | 580 | |
— | — | @@ -584,20 +584,20 @@ |
585 | 585 | $this->db->query( 'DROP INDEX pagelink_unique' ); |
586 | 586 | $pu = null; |
587 | 587 | } else { |
588 | | - $this->output( "... obsolete version of index 'pagelink_unique index' does not exist\n" ); |
| 588 | + $this->output( "...obsolete version of index 'pagelink_unique index' does not exist\n" ); |
589 | 589 | } |
590 | 590 | |
591 | 591 | if ( is_null( $pu ) ) { |
592 | 592 | $this->output( "Creating index 'pagelink_unique index'\n" ); |
593 | 593 | $this->db->query( 'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ); |
594 | 594 | } else { |
595 | | - $this->output( "... index 'pagelink_unique_index' already exists\n" ); |
| 595 | + $this->output( "...index 'pagelink_unique_index' already exists\n" ); |
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
599 | 599 | protected function checkRevUserFkey() { |
600 | 600 | if ( $this->fkeyDeltype( 'revision_rev_user_fkey' ) == 'r' ) { |
601 | | - $this->output( "... constraint 'revision_rev_user_fkey' is ON DELETE RESTRICT\n" ); |
| 601 | + $this->output( "...constraint 'revision_rev_user_fkey' is ON DELETE RESTRICT\n" ); |
602 | 602 | } else { |
603 | 603 | $this->output( "Changing constraint 'revision_rev_user_fkey' to ON DELETE RESTRICT\n" ); |
604 | 604 | $this->applyPatch( 'patch-revision_rev_user_fkey.sql' ); |
— | — | @@ -610,7 +610,7 @@ |
611 | 611 | $this->db->query( 'DROP INDEX ipb_address' ); |
612 | 612 | } |
613 | 613 | if ( $this->db->indexExists( 'ipblocks', 'ipb_address_unique' ) ) { |
614 | | - $this->output( "... have ipb_address_unique\n" ); |
| 614 | + $this->output( "...have ipb_address_unique\n" ); |
615 | 615 | } else { |
616 | 616 | $this->output( "Adding ipb_address_unique index\n" ); |
617 | 617 | $this->applyPatch( 'patch-ipb_address_unique.sql' ); |