| @@ 463-478 (lines=16) @@ | ||
| 460 | self::assertSame('BLOB', $this->_platform->getBinaryTypeDeclarationSQL(array('fixed' => true, 'length' => 2001))); |
|
| 461 | } |
|
| 462 | ||
| 463 | public function testDoesNotPropagateUnnecessaryTableAlterationOnBinaryType() |
|
| 464 | { |
|
| 465 | $table1 = new Table('mytable'); |
|
| 466 | $table1->addColumn('column_varbinary', 'binary'); |
|
| 467 | $table1->addColumn('column_binary', 'binary', array('fixed' => true)); |
|
| 468 | ||
| 469 | $table2 = new Table('mytable'); |
|
| 470 | $table2->addColumn('column_varbinary', 'binary', array('fixed' => true)); |
|
| 471 | $table2->addColumn('column_binary', 'binary'); |
|
| 472 | ||
| 473 | $comparator = new Comparator(); |
|
| 474 | ||
| 475 | // VARBINARY -> BINARY |
|
| 476 | // BINARY -> VARBINARY |
|
| 477 | self::assertEmpty($this->_platform->getAlterTableSQL($comparator->diffTable($table1, $table2))); |
|
| 478 | } |
|
| 479 | ||
| 480 | /** |
|
| 481 | * @group DBAL-563 |
|
| @@ 815-830 (lines=16) @@ | ||
| 812 | self::assertCount(0, $tableDiff->renamedIndexes); |
|
| 813 | } |
|
| 814 | ||
| 815 | public function testDetectChangeIdentifierType() |
|
| 816 | { |
|
| 817 | $this->markTestSkipped('DBAL-2 was reopened, this test cannot work anymore.'); |
|
| 818 | ||
| 819 | $tableA = new Table("foo"); |
|
| 820 | $tableA->addColumn('id', 'integer', array('autoincrement' => false)); |
|
| 821 | ||
| 822 | $tableB = new Table("foo"); |
|
| 823 | $tableB->addColumn('id', 'integer', array('autoincrement' => true)); |
|
| 824 | ||
| 825 | $c = new Comparator(); |
|
| 826 | $tableDiff = $c->diffTable($tableA, $tableB); |
|
| 827 | ||
| 828 | self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff); |
|
| 829 | self::assertArrayHasKey('id', $tableDiff->changedColumns); |
|
| 830 | } |
|
| 831 | ||
| 832 | ||
| 833 | /** |
|