Skip to content

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.

@MasterOdin MasterOdin force-pushed the fix-sqlite-primary-key branch from 9b4e7bb to 9e9ca7b Compare June 4, 2024 03:59
@MasterOdin MasterOdin force-pushed the fix-sqlite-primary-key branch from 9e9ca7b to d20e3e5 Compare June 4, 2024 03:59
@dereuromark dereuromark merged commit b1e8669 into 0.x Jun 4, 2024
@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

3 participants