createTableAndColumn($sourceSchema, Types::INTEGER); $this->createTableAndColumn($targetSchema, Types::BIGINT); $comparator = new Comparator($platform); $diff = $comparator->compareSchemas($sourceSchema, $targetSchema); $sqlStatements = $platform->getAlterSchemaSQL($diff); $this->assertContains( 'ALTER TABLE poor_yorick ALTER id TYPE BIGINT', $sqlStatements ); $this->assertNotContains( 'ALTER TABLE poor_yorick ALTER id DROP DEFAULT', $sqlStatements ); } protected function createTableAndColumn(Schema $schema, string $type): void { $table = $schema->createTable("poor_yorick"); $table->addColumn('id', $type, [ 'autoincrement' => true, 'unsigned' => true, 'notnull' => true, 'length' => 11, ]); } }