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