Skip to content

Commit

Permalink
bug fix where 'php artisan migrate:reset' would error. (#2413)
Browse files Browse the repository at this point in the history
  • Loading branch information
NuktukDev authored Feb 4, 2024
1 parent da32b9c commit 7521943
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions migrations/default/2023_03_24_125122_add_id_to_related.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ public function up(): void

public function down(): void
{
Schema::table(config('twill.related_table', 'twill_related'), function (Blueprint $table) {
$table->dropColumn('id');
});
if (Schema::hasColumn(config('twill.related_table', 'twill_related'), 'id')) {
Schema::table(config('twill.related_table', 'twill_related'), function (Blueprint $table) {
$table->dropColumn('id');
});
}
}
};

0 comments on commit 7521943

Please sign in to comment.