From b339bb408023ecd737a5125ad7e42448b141857f Mon Sep 17 00:00:00 2001 From: Drew Roberts Date: Thu, 18 Mar 2021 11:25:56 -0400 Subject: [PATCH] Allow nullable status creator for system updates #27 --- .../2020_05_08_110000_create_status_records_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2020_05_08_110000_create_status_records_table.php b/database/migrations/2020_05_08_110000_create_status_records_table.php index ca6050b..a76d68a 100644 --- a/database/migrations/2020_05_08_110000_create_status_records_table.php +++ b/database/migrations/2020_05_08_110000_create_status_records_table.php @@ -15,7 +15,7 @@ public function up() $table->foreignIdFor(app('status'))->index(); $table->morphs('statusable'); $table->string('type'); // Typically, full class name for model using status - $table->foreignIdFor(app('user'), 'creator_id'); + $table->foreignIdFor(app('user'), 'creator_id')->nullable(); $table->timestamp('created_at'); }); }