From 62fdd541fa0d70e790ef199cb937d8d36e071e5d Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Wed, 7 Aug 2024 19:25:32 +0100 Subject: [PATCH] Only run RelateFormSubmissionsByHandle when we have form submissions (#334) --- src/Updates/RelateFormSubmissionsByHandle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Updates/RelateFormSubmissionsByHandle.php b/src/Updates/RelateFormSubmissionsByHandle.php index 46e193b9..15e36e1d 100644 --- a/src/Updates/RelateFormSubmissionsByHandle.php +++ b/src/Updates/RelateFormSubmissionsByHandle.php @@ -9,7 +9,7 @@ class RelateFormSubmissionsByHandle extends UpdateScript { public function shouldUpdate($newVersion, $oldVersion) { - return ! Schema::hasColumn(config('statamic.eloquent-driver.table_prefix', '').'form_submissions', 'form'); + return Schema::hasTable(config('statamic.eloquent-driver.table_prefix', '').'form_submissions') && ! Schema::hasColumn(config('statamic.eloquent-driver.table_prefix', '').'form_submissions', 'form'); } public function update()