Skip to content

workload/schemachange: add fk constraints #57472

@jayshrivastava

Description

@jayshrivastava

Implement the addForiegnKeyConstraint operation to add a foreign key constraint between two columns. To ensure that
there are enough parent columns (which need to have a unique constraint), it would be beneficial to implement a addUniqueConstraint operation as well.

The following ops will need to be updated because they interact with foreign keys:

  • insertRow - verify if inserting data will result in a pgcode.ForeignKeyViolation

Metadata

Metadata

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions