New method `ColumnDefinitionBuilderInterface::buildForeignKey()`
Open
Nobody has claimed this yet.
severity:BC breaking
type:feature
- Dominant language
- PHP
- Stars
- 216
- Forks
- 51
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 2
Description
Proposed new feature or change
Add new method
ColumnDefinitionBuilderInterface::buildForeignKey(ForeignKey $fk): string
to build foreign key definitions to create tables, like
CONSTRAINT {{{$fkName}}} FOREIGN KEY ([[id]]) REFERENCES {{{$referenceTableName}}}` ([[id]]) ON DELETE CASCADE ON UPDATE RESTRICT
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ColumnDefinitionBuilderInterface and the related src/DbSchemaManager.php code at lines 129-141. Trace the existing table-definition builders and their tests to determine where foreign-key definitions are assembled. Done means the interface method builds the specified constraint, reference, and delete/update actions for table creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100