Skip to content

New method ColumnDefinitionBuilderInterface::buildForeignKey() #1154

Description

@Tigrov

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

Related with https://github.com/yiisoft/translator-message-db/blob/7060706db0a481d3f80c3a120e28ac812ff41dbc/src/DbSchemaManager.php#L129-L141

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions