Skip to content

Commit

Permalink
[9.x] Add noActionOnDelete method (#45712)
Browse files Browse the repository at this point in the history
* Add noActionOnDelete() and noActionOnUpdate methods in ForeignKeyDefinition

* Remove noActionOnUpdate() method in ForeignKeyDefinition

* Update ForeignKeyDefinition.php

Co-authored-by: Erfan Hemmati <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2023
1 parent af11be5 commit 0ff1284
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Database/Schema/ForeignKeyDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@ public function nullOnDelete()
{
return $this->onDelete('set null');
}

/**
* Indicate that deletes should have "no action".
*
* @return $this
*/
public function noActionOnDelete()
{
return $this->onDelete('no action');
}
}

0 comments on commit 0ff1284

Please sign in to comment.