Skip to content

Add support for schema-qualified table names in TableMetadataStorage - #1585

Open
rafarian wants to merge 2 commits into
doctrine:3.10.xfrom
rafarian:hotfix-issue-1584-needs-update-needs-to-recognize-schema
Open

rafarian wants to merge 2 commits into
doctrine:3.10.xfrom
rafarian:hotfix-issue-1584-needs-update-needs-to-recognize-schema

Conversation

@rafarian

@rafarian rafarian commented Apr 7, 2026

Copy link
Copy Markdown
Q A
Type bug
BC Break no
Fixed issues #1584

Summary

TableMetadataStorage::needsUpdate() passes the full configured table name
(e.g. myschema.doctrine_migration_versions) directly to
introspectTableByUnquotedName(), introduced in doctrine/dbal 4.4.x.
Unlike the deprecated introspectTable() it replaces, the new method does not
parse dot notation — schema and table name must be supplied as separate arguments.
This causes a fatal error when the migrations table is configured with a schema prefix.

@rafarian

Copy link
Copy Markdown
Author

Its another approach for #1566

@greg0ire greg0ire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I see with this solution is that it requires configuring the schema name. It might be a good contribution, but maybe to 4.0.x 🤔

return $schema !== null
? $schema . '.' . $this->configuration->getTableName()
: $this->configuration->getTableName();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method should be moved to the configuration object, and getSchemaName() should be removed.

@greg0ire
greg0ire changed the base branch from 3.9.x to 3.10.x November 24, 2026 20:36
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

Successfully merging this pull request may close these issues.

2 participants