Skip to content

[9.x] Add noActionOnDelete method#45712

Merged
taylorotwell merged 3 commits intolaravel:9.xfrom
erfanhemmati:9.x
Jan 18, 2023
Merged

[9.x] Add noActionOnDelete method#45712
taylorotwell merged 3 commits intolaravel:9.xfrom
erfanhemmati:9.x

Conversation

@erfanhemmati
Copy link
Copy Markdown
Contributor

@erfanhemmati erfanhemmati commented Jan 18, 2023

This PR will add a new method in the ForeignKeyDefinition class with this method clients are able to create a foreign key in their migrations with the no action property/option.

  • example
    $table->foreign('user_id')->references('id')->on('users')->noActionOnDelete();

@erfanhemmati
Copy link
Copy Markdown
Contributor Author

@taylorotwell

@taylorotwell taylorotwell merged commit 0ff1284 into laravel:9.x Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants