Skip to content

Handle schema names in table metadata#1567

Open
greg0ire wants to merge 1 commit intodoctrine:3.9.xfrom
greg0ire:gh-1564
Open

Handle schema names in table metadata#1567
greg0ire wants to merge 1 commit intodoctrine:3.9.xfrom
greg0ire:gh-1564

Conversation

@greg0ire
Copy link
Member

@greg0ire greg0ire commented Feb 18, 2026

Fixes #1566

In a previous commit, I switched from introspectTable(), which handles this with a single argument to introspectTableByUnquotedName(), which handles it with 2 arguments.

I could not find a way to test this since we use SQLite and that the corresponding DBAL platform does not support schemas.

In a previous commit, I switched from introspectTable(), which handles
this with a single argument to introspectTableByUnquotedName(), which
handles it with two.
@SenseException
Copy link
Member

It looks like there's no test that covers table names with a dot. Maybe you can cover your new code path with a test like Doctrine\Migrations\Tests\Metadata\Storage\TableMetadataStorageTest::testTableStructure()

@greg0ire
Copy link
Member Author

@SenseException that test relies on SQLite, which does not support namespaces.

@stlrnz
Copy link

stlrnz commented Feb 19, 2026

I can confirm that this PR fixes #1566

Thank you!

@SenseException
Copy link
Member

@greg0ire It introduces a new code path with a new if-block, that I, AFAIK, don't see covered by a test. Please let me know if there's one that covers the new path elsewhere that I missed.

@greg0ire
Copy link
Member Author

greg0ire commented Feb 19, 2026

I don't think it is currently covered because it is about schemas, and we only have SQLite available in this test suite I think, and it does not support schemas, or rather, the corresponding DBAL platform doesn't.

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.

Configuring custom database schema name for migration_versions table breaks every command in release 3.9.6

3 participants