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

Fix using string primary_key value for sqlite #2285

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

MasterOdin
Copy link
Member

Fixes #2283

PR fixes a bug for sqlite where if a string value was passed for the primary_key option, then following error would be thrown:

ArgumentCountError: Too few arguments to function Phinx\Db\Adapter\SQLiteAdapter::hasPrimaryKey(), 1 passed in /home/mpeveler/github/phinx/tests/Phinx/Db/Adapter/SQLiteAdapterTest.php on line 179 and at least 2 expected

Surprisingly, this looks like it's been broken for 4+ years, though I guess not too many people use sqlite and use custom identity columns for primary keys.

@dereuromark dereuromark merged commit b1e8669 into 0.x Jun 4, 2024
12 checks passed
@dereuromark dereuromark deleted the fix-sqlite-primary-key branch June 4, 2024 05:19
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.

primary_key string value with SqliteAdapter results in TypeError
2 participants