cakephp / cakephp/phinx

no possibility to added MATCH option when we using addForeignKey method (postgresql)

Open
#1,992 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello Team!
Will be nice if the options for addForeignKey were expanded to add MATCH for references

for the syntax

ALTER TABLE public.some_table
  ADD CONSTRAINT some_fk FOREIGN KEY (some_column)
    REFERENCES public.some_table2(id) MATCH FULL
 ON DELETE NO ACTION ON UPDATE NO ACTION INITIALLY IMMEDIATE; 

we can set all of this option except MATCH option

of course we can use pure sql for this case ;) But match option will be useful for many cases

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

Review the addForeignKey entry point and the PostgreSQL-specific migration path to locate where foreign-key options are assembled. Done means supporting the MATCH option in generated SQL and verifying it with the project's relevant migration tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.