Skip to content

Commit

Permalink
Only run RelateFormSubmissionsByHandle when we have form submissions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Aug 7, 2024
1 parent 8c73ba9 commit 62fdd54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Updates/RelateFormSubmissionsByHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 62fdd54

Please sign in to comment.