1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Fix entity deletion

Foreign keys take care of most of this for us!
This commit is contained in:
Toby Zerner
2018-07-21 17:18:40 +09:30
parent bcd74ff09b
commit e8cd2d4111
4 changed files with 2 additions and 35 deletions

View File

@@ -37,8 +37,8 @@ return [
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
$table->foreign('last_posted_user_id')->references('id')->on('users')->onDelete('set null');
$table->foreign('hidden_user_id')->references('id')->on('users')->onDelete('set null');
$table->foreign('first_post_id')->references('id')->on('posts');
$table->foreign('last_post_id')->references('id')->on('posts');
$table->foreign('first_post_id')->references('id')->on('posts')->onDelete('set null');
$table->foreign('last_post_id')->references('id')->on('posts')->onDelete('set null');
});
},