Migrations: Use on update cascade

main
Igor Scheller 5 years ago
parent 3a6d096fff
commit a2f4426058

@ -31,6 +31,7 @@ trait ChangesReferences
$table->foreign($reference->column) $table->foreign($reference->column)
->references($targetColumn)->on($targetTable) ->references($targetColumn)->on($targetTable)
->onUpdate('cascade')
->onDelete('cascade'); ->onDelete('cascade');
} }
); );

@ -31,6 +31,7 @@ trait Reference
$table->foreign($fromColumn) $table->foreign($fromColumn)
->references('id')->on($targetTable) ->references('id')->on($targetTable)
->onUpdate('cascade')
->onDelete('cascade'); ->onDelete('cascade');
} }
} }

Loading…
Cancel
Save