onDelete is not reflected when onUpdate and onDelete are set.
ucan-lab opened this issue · 0 comments
ucan-lab commented
Current
tasks:
relations:
- foreign: user_id
references: id
on: users
onUpdate: cascade
onDelete: cascade
columns:
id: bigIncrements
user_id: unsignedBigInteger
content: string
$table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade');
After
$table->foreign('user_id')->references('id')->on('users')->onUpdate('cascade')->onDelete('cascade');