| @@ 452-467 (lines=16) @@ | ||
| 449 | self::assertSame('BLOB', $this->_platform->getBinaryTypeDeclarationSQL(array('fixed' => true, 'length' => 2001))); |
|
| 450 | } |
|
| 451 | ||
| 452 | public function testDoesNotPropagateUnnecessaryTableAlterationOnBinaryType() |
|
| 453 | { |
|
| 454 | $table1 = new Table('mytable'); |
|
| 455 | $table1->addColumn('column_varbinary', 'binary'); |
|
| 456 | $table1->addColumn('column_binary', 'binary', array('fixed' => true)); |
|
| 457 | ||
| 458 | $table2 = new Table('mytable'); |
|
| 459 | $table2->addColumn('column_varbinary', 'binary', array('fixed' => true)); |
|
| 460 | $table2->addColumn('column_binary', 'binary'); |
|
| 461 | ||
| 462 | $comparator = new Comparator(); |
|
| 463 | ||
| 464 | // VARBINARY -> BINARY |
|
| 465 | // BINARY -> VARBINARY |
|
| 466 | self::assertEmpty($this->_platform->getAlterTableSQL($comparator->diffTable($table1, $table2))); |
|
| 467 | } |
|
| 468 | ||
| 469 | /** |
|
| 470 | * @group DBAL-563 |
|
| @@ 762-777 (lines=16) @@ | ||
| 759 | self::assertCount(0, $tableDiff->renamedIndexes); |
|
| 760 | } |
|
| 761 | ||
| 762 | public function testDetectChangeIdentifierType() |
|
| 763 | { |
|
| 764 | $this->markTestSkipped('DBAL-2 was reopened, this test cannot work anymore.'); |
|
| 765 | ||
| 766 | $tableA = new Table("foo"); |
|
| 767 | $tableA->addColumn('id', 'integer', array('autoincrement' => false)); |
|
| 768 | ||
| 769 | $tableB = new Table("foo"); |
|
| 770 | $tableB->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 771 | ||
| 772 | $c = new Comparator(); |
|
| 773 | $tableDiff = $c->diffTable($tableA, $tableB); |
|
| 774 | ||
| 775 | self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff); |
|
| 776 | self::assertArrayHasKey('id', $tableDiff->changedColumns); |
|
| 777 | } |
|
| 778 | ||
| 779 | ||
| 780 | /** |
|