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

Provide an upgrade path for the change in auto-generated in index name #6733

Open
morozov opened this issue Jan 21, 2025 · 0 comments
Open
Labels
Milestone

Comments

@morozov
Copy link
Member

morozov commented Jan 21, 2025

Prior to #6732, the name for the index supporting a foreign key constraint was generated from the exact values of the column names as specified by the user (e.g. id or `id`). In the new implementation, only the actual name is used (id), hence the change. We cannot (and don't want to) preserve the exact values of the quotes in the new implementation because they are just part of the syntax and shouldn't be taken into account. `A` and "A" (which both mean "quoted A") should not yield different hashes.

An even more proper implementation should use the value of the identifier normalized for the target platform, e.g. for Oracle, names a, A and "A" should yield the same hash.

I'm not documenting the upgrade path for this change yet because I want to clarify a few more details:

  1. Whether this is indeed a breaking change (if the DBAL can detect and handle the index change, we should consider it just a necessary migration).
  2. What steps can the users take to proactively handle this change (e.g. temporarily, explicitly specify index names).
  3. It is possible that at some point we will get rid of auto-generated names and delegate that to the underlying database (that would be ideal and already works if a constraint without a name is passed to the Table constructor).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant