Skip to content

Commit 0890706

Browse files
[11.x] add nullOnUpdate() method to ForeignKeyDefinition (#52798)
* add nullOnUpdate() method to ForeignKeyDefinition * Update ForeignKeyDefinition.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 6143186 commit 0890706

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Illuminate/Database/Schema/ForeignKeyDefinition.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ public function restrictOnUpdate()
3434
return $this->onUpdate('restrict');
3535
}
3636

37+
/**
38+
* Indicate that updates should set the foreign key value to null.
39+
*
40+
* @return $this
41+
*/
42+
public function nullOnUpdate()
43+
{
44+
return $this->onUpdate('set null');
45+
}
46+
3747
/**
3848
* Indicate that updates should have "no action".
3949
*

0 commit comments

Comments
 (0)