Skip to content

primary_key string value with SqliteAdapter results in TypeError #2283

@InvisibleSmiley

Description

@InvisibleSmiley
$this->table('foo', ['id' => false, 'primary_key' => 'foo_id'])
->addColumn('foo_id', 'integer', ['identity' => true])
->create();

(this is just an example, I know I could use id here or drop it altogether)

With SQLiteAdapter:

TypeError: array_search(): Argument #2 ($haystack) must be of type array, string given
.../vendor/robmorgan/phinx/src/Phinx/Db/Adapter/SQLiteAdapter.php:433

No issues with MysqlAdapter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions