Skip to content

AddPrimaryKeyConstraint replaces setPrimaryKey but usage is unclear #7296

@HectorOrdonez

Description

@HectorOrdonez

In #6867 doctrine deprecates setPrimaryKey, and says we should use addPrimaryKeyConstraint instead.

Usage of setPrimaryKey was:

$table->setPrimaryKey(['id']);

However, addPrimaryKeyConstraint requires a PrimaryKeyConstraint object, not an string[], like previously.

I could not find references to how are we supposed to use this new functionality and the upgrade docs do not mention it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions