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

Introduce AbstractSchemaManager::getCurrentSchemaName() #6746

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

morozov
Copy link
Member

@morozov morozov commented Jan 28, 2025

Currently, the logic of building qualified or unqualified table/view/sequence names during schema introspection is scattered across schema managers implementations an is inconsistent. On the one hand, this is okay since some database platforms support schemas, and others don't. However, at a high level, the introspection logic it the same for all platforms:

  1. Query the introspection schema and group rows by the table to which they belong.
  2. If the platform supports schemas, do not include the default schema into the name (so that accounts remains represented as accounts, not public.accounts on Postgres or dbo.accounts on SQL Server).

As part of the work on on introspecting table names as objects, I want to make this logic explicitly written in the code. And for that, the API of all schema managers should be consistent.

@morozov morozov added this to the 4.3.0 milestone Jan 28, 2025
@morozov morozov force-pushed the get-default-schema-name branch from ef95571 to 0493ce9 Compare January 28, 2025 06:30
@morozov morozov marked this pull request as ready for review January 28, 2025 06:40
@morozov morozov requested a review from greg0ire January 28, 2025 06:41
@morozov morozov merged commit 6a9c6db into doctrine:4.3.x Jan 29, 2025
66 checks passed
@morozov morozov deleted the get-default-schema-name branch January 29, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants