From e39e11014a31ddfc33529c554b884fa9e0121e0d Mon Sep 17 00:00:00 2001 From: Yuta Nagamiya Date: Wed, 17 May 2017 00:32:29 +0900 Subject: [PATCH] Fix an error when deleting a GitHub webhook user --- .../migrations/2015_02_28_164641_create_projects_table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/migrations/2015_02_28_164641_create_projects_table.php b/database/migrations/2015_02_28_164641_create_projects_table.php index ed83ba88..7f8e2664 100644 --- a/database/migrations/2015_02_28_164641_create_projects_table.php +++ b/database/migrations/2015_02_28_164641_create_projects_table.php @@ -32,7 +32,8 @@ public function up() ->on('servers'); $table->foreign('github_webhook_user_id') ->references('id') - ->on('users'); + ->on('users') + ->onDelete('set null'); }); }