From 7a24e554b08600accb784dc8e455bd639a193749 Mon Sep 17 00:00:00 2001 From: Housemann <40449280+Housemann@users.noreply.github.com> Date: Sat, 13 Jun 2026 17:23:54 +0200 Subject: [PATCH] Fix duplicate is_admin migration class conflict Both migration files shared the same class name causing a "Class not found" error on fresh migrate runs. Made the first (empty) file a true no-op and guarded the second with Schema::hasColumn to safely skip if the column already exists. Co-Authored-By: Claude Sonnet 4.6 --- ...8_10_020525_add_is_admin_to_users_table.php | 18 ++++++++++++++++++ ...8_10_162556_add_is_admin_to_users_table.php | 8 +++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/database/migrations/2025_08_10_020525_add_is_admin_to_users_table.php b/database/migrations/2025_08_10_020525_add_is_admin_to_users_table.php index e69de29..c0303a8 100644 --- a/database/migrations/2025_08_10_020525_add_is_admin_to_users_table.php +++ b/database/migrations/2025_08_10_020525_add_is_admin_to_users_table.php @@ -0,0 +1,18 @@ +boolean('is_admin')->default(false)->after('password'); - }); + if (!Schema::hasColumn('users', 'is_admin')) { + Schema::table('users', function (Blueprint $table) { + $table->boolean('is_admin')->default(false)->after('password'); + }); + } } /**