diff --git a/db/migrations/ChangesReferences.php b/db/migrations/ChangesReferences.php index 1e7a5f10..b5b39ac3 100644 --- a/db/migrations/ChangesReferences.php +++ b/db/migrations/ChangesReferences.php @@ -31,6 +31,7 @@ trait ChangesReferences $table->foreign($reference->column) ->references($targetColumn)->on($targetTable) + ->onUpdate('cascade') ->onDelete('cascade'); } ); diff --git a/db/migrations/Reference.php b/db/migrations/Reference.php index 4c35b59b..719bee76 100644 --- a/db/migrations/Reference.php +++ b/db/migrations/Reference.php @@ -31,6 +31,7 @@ trait Reference $table->foreign($fromColumn) ->references('id')->on($targetTable) + ->onUpdate('cascade') ->onDelete('cascade'); } }