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

Start switching to cakephp/database for schema reflection #794

Merged
merged 4 commits into from
Dec 31, 2024

Conversation

markstory
Copy link
Member

Start the set of changes to switch migrations adapters to use cakephp/database more for schema reflection. The SQLite adapter required many changes to align on " for identifier quoting instead of backtick. While backtick works it is listed as a 'non-standard compatibility'.

I also found a few places where we weren't using the quoting methods and were relying on simple string interpolation and fixed those as well. I'll continue to convert schema reflection logic for sqlite and other adapters in a series of pull requests to keep changes reasonably sized.

Start to remove logic we can get from cakephp/database.
cakephp/database uses " for identifier quoting (as per the sqlite docs)
but historically phinx used `. Many tests had to changes for this. While
we were doing a good job of supporting all the quoting styles in most
places a few were missed. I also found a few places we were doing
quoting with simple interpolation which isn't ideal.

Because cake's quoting supports less exotic table names we don't need to
support those in migrations anymore either.
Don't pollute the disk with cache files.
@markstory markstory added this to the 4.x (CakePHP 5) milestone Dec 30, 2024
@markstory markstory merged commit 730654f into 4.next Dec 31, 2024
20 checks passed
@markstory markstory deleted the schema-reflection branch December 31, 2024 17:15
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.

1 participant