Skip to content

[DBAL-830] Fix SQL Server default constraint name generation for quoted identifiers#672

Merged
Ocramius merged 2 commits intodoctrine:masterfrom
deeky666:DBAL-830
Sep 10, 2014
Merged

[DBAL-830] Fix SQL Server default constraint name generation for quoted identifiers#672
Ocramius merged 2 commits intodoctrine:masterfrom
deeky666:DBAL-830

Conversation

@deeky666
Copy link
Member

@deeky666 deeky666 commented Sep 2, 2014

This is a replacement for #539.
It makes the generation of default constraint names consistent for quoted and unquoted identifiers by always unquoting them before generating the hash. This is the only possibility to ensure that the same hash is always generated for the same identifiers.
Unfortunately this introduces a minor BC break for existing applications that use either reserved keywords or explicitly quoted identifiers for columns with a declared default value and want to alter those columns in the future. It will generate DROP CONSTRAINT / ADD CONSTRAINT statements with different contraint names for the first time for a table alteration on existing v2.4 schemas.

@deeky666
Copy link
Member Author

deeky666 commented Sep 2, 2014

/cc @DeepDiver1975

@Ocramius
Copy link
Member

👍 here

@Ocramius Ocramius self-assigned this Sep 10, 2014
Ocramius added a commit that referenced this pull request Sep 10, 2014
[DBAL-830] Fix SQL Server default constraint name generation for quoted identifiers
@Ocramius Ocramius merged commit 51074ff into doctrine:master Sep 10, 2014
@DeepDiver1975
Copy link
Contributor

@deeky666 I finally did find the time to test this - works now - many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants