cakephp / cakephp/phinx

Deferrable constraints

Open
#1,665 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

Hello,

On some DBMS (like PostgreSQL) it is possible to have deferrable constraints.
This is useful and we use this feature for almost all of our Foreign Key constraints.

It seems that it is not possible to have this feature when using the "addForeignKey" function.

It there something that I missed or it is not implemented in Phinx?
If it is not implemented, is there any chance to have this feature supported in Phinx?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Phinx's addForeignKey function and trace how foreign-key options are translated for PostgreSQL. Check whether the migration API or adapter already exposes constraint options; done means deferrable constraints can be requested through addForeignKey and are emitted correctly for PostgreSQL.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.