Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement platform-aware schema comparison #1227

Closed
greg0ire opened this issue Jan 12, 2022 · 0 comments
Closed

Implement platform-aware schema comparison #1227

greg0ire opened this issue Jan 12, 2022 · 0 comments
Assignees

Comments

@greg0ire
Copy link
Member

greg0ire commented Jan 12, 2022

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

Since doctrine/dbal 3.2.0, regular comparison is deprecated in favor of platform-aware-schema comparison: https://www.doctrine-project.org/2021/11/26/dbal-3.2.0.html

This should fix a number of false-positive and false-negative issues.

This involves changing this piece of code:

$up = $this->migrationSqlGenerator->generate(
$fromSchema->getMigrateToSql($toSchema, $this->platform),
$formatted,
$lineLength,
$checkDbPlatform
);
$down = $this->migrationSqlGenerator->generate(
$fromSchema->getMigrateFromSql($toSchema, $this->platform),
$formatted,
$lineLength,
$checkDbPlatform
);

as well as

public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array
{
return $fromSchema->getMigrateToSql($toSchema, $this->platform);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant