Index: trunk/phase3/CREDITS |
— | — | @@ -96,6 +96,7 @@ |
97 | 97 | * Dan Collins |
98 | 98 | * Dan Nessett |
99 | 99 | * Daniel Arnold |
| 100 | +* David Baumgarten |
100 | 101 | * Denny Vrandecic |
101 | 102 | * Edward Z. Yang |
102 | 103 | * Erwin Dokter |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -412,10 +412,10 @@ |
413 | 413 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
414 | 414 | */ |
415 | 415 | protected function addTable( $name, $patch, $fullpath = false ) { |
| 416 | + $this->output( "Creating $name table... " ); |
416 | 417 | if ( $this->db->tableExists( $name, __METHOD__ ) ) { |
417 | | - $this->output( "...$name table already exists.\n" ); |
| 418 | + $this->output( "...$name table already exists. Skipping create table $name\n" ); |
418 | 419 | } else { |
419 | | - $this->output( "Creating $name table..." ); |
420 | 420 | $this->applyPatch( $patch, $fullpath ); |
421 | 421 | $this->output( "ok\n" ); |
422 | 422 | } |
— | — | @@ -429,12 +429,12 @@ |
430 | 430 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
431 | 431 | */ |
432 | 432 | protected function addField( $table, $field, $patch, $fullpath = false ) { |
| 433 | + $this->output( "Adding $field field to table $table..." ); |
433 | 434 | if ( !$this->db->tableExists( $table, __METHOD__ ) ) { |
434 | 435 | $this->output( "...$table table does not exist, skipping new field patch\n" ); |
435 | 436 | } elseif ( $this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
436 | | - $this->output( "...have $field field in $table table.\n" ); |
| 437 | + $this->output( "...already have $field field in $table table, skipping new field patch\n" ); |
437 | 438 | } else { |
438 | | - $this->output( "Adding $field field to table $table..." ); |
439 | 439 | $this->applyPatch( $patch, $fullpath ); |
440 | 440 | $this->output( "ok\n" ); |
441 | 441 | } |
— | — | @@ -448,10 +448,10 @@ |
449 | 449 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
450 | 450 | */ |
451 | 451 | protected function addIndex( $table, $index, $patch, $fullpath = false ) { |
| 452 | + $this->output( "Adding $index key to table $table... " ); |
452 | 453 | if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) { |
453 | | - $this->output( "...$index key already set on $table table.\n" ); |
| 454 | + $this->output( "...$index key already set on $table table, skipping new index patch\n" ); |
454 | 455 | } else { |
455 | | - $this->output( "Adding $index key to table $table... " ); |
456 | 456 | $this->applyPatch( $patch, $fullpath ); |
457 | 457 | $this->output( "ok\n" ); |
458 | 458 | } |
— | — | @@ -466,12 +466,12 @@ |
467 | 467 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
468 | 468 | */ |
469 | 469 | protected function dropField( $table, $field, $patch, $fullpath = false ) { |
| 470 | + $this->output( "Dropping field $field from table $table... " ); |
470 | 471 | if ( $this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
471 | | - $this->output( "Table $table contains $field field. Dropping... " ); |
472 | 472 | $this->applyPatch( $patch, $fullpath ); |
473 | 473 | $this->output( "ok\n" ); |
474 | 474 | } else { |
475 | | - $this->output( "...$table table does not contain $field field.\n" ); |
| 475 | + $this->output( "...$table table does not contain $field field, skipping drop field\n" ); |
476 | 476 | } |
477 | 477 | } |
478 | 478 | |
— | — | @@ -484,12 +484,12 @@ |
485 | 485 | * @param $fullpath Boolean: Whether to treat $patch path as a relative or not |
486 | 486 | */ |
487 | 487 | protected function dropIndex( $table, $index, $patch, $fullpath = false ) { |
| 488 | + $this->output( "Dropping $index key from table $table... " ); |
488 | 489 | if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) { |
489 | | - $this->output( "Dropping $index key from table $table... " ); |
490 | 490 | $this->applyPatch( $patch, $fullpath ); |
491 | 491 | $this->output( "ok\n" ); |
492 | 492 | } else { |
493 | | - $this->output( "...$index key doesn't exist.\n" ); |
| 493 | + $this->output( "...$index key doesn't exist in table $table, skipping drop key\n" ); |
494 | 494 | } |
495 | 495 | } |
496 | 496 | |
— | — | @@ -499,12 +499,12 @@ |
500 | 500 | * @param $fullpath bool |
501 | 501 | */ |
502 | 502 | protected function dropTable( $table, $patch, $fullpath = false ) { |
| 503 | + $this->output( "Dropping table $table... " ); |
503 | 504 | if ( $this->db->tableExists( $table, __METHOD__ ) ) { |
504 | | - $this->output( "Dropping table $table... " ); |
505 | 505 | $this->applyPatch( $patch, $fullpath ); |
506 | 506 | $this->output( "ok\n" ); |
507 | 507 | } else { |
508 | | - $this->output( "...$table doesn't exist.\n" ); |
| 508 | + $this->output( "...$table doesn't exist, skipping drop table.\n" ); |
509 | 509 | } |
510 | 510 | } |
511 | 511 | |
— | — | @@ -518,6 +518,7 @@ |
519 | 519 | */ |
520 | 520 | public function modifyField( $table, $field, $patch, $fullpath = false ) { |
521 | 521 | $updateKey = "$table-$field-$patch"; |
| 522 | + $this->output( "Modifying $field field of table $table... " ); |
522 | 523 | if ( !$this->db->tableExists( $table, __METHOD__ ) ) { |
523 | 524 | $this->output( "...$table table does not exist, skipping modify field patch\n" ); |
524 | 525 | } elseif ( !$this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
— | — | @@ -525,7 +526,6 @@ |
526 | 527 | } elseif( $this->updateRowExists( $updateKey ) ) { |
527 | 528 | $this->output( "...$field in table $table already modified by patch $patch\n" ); |
528 | 529 | } else { |
529 | | - $this->output( "Modifying $field field of table $table..." ); |
530 | 530 | $this->applyPatch( $patch, $fullpath ); |
531 | 531 | $this->insertUpdateRow( $updateKey ); |
532 | 532 | $this->output( "ok\n" ); |