From dcbc95ba4bddfe8725ac399860ba884c67283a36 Mon Sep 17 00:00:00 2001 From: pavithrak27 Date: Wed, 24 Jun 2026 22:06:40 +0530 Subject: [PATCH] fixed api issue --- ...26_06_24_203838_add_license_data_to_sponsors_table.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/database/migrations/2026_06_24_203838_add_license_data_to_sponsors_table.php b/database/migrations/2026_06_24_203838_add_license_data_to_sponsors_table.php index e5d9325..02cc509 100644 --- a/database/migrations/2026_06_24_203838_add_license_data_to_sponsors_table.php +++ b/database/migrations/2026_06_24_203838_add_license_data_to_sponsors_table.php @@ -12,7 +12,9 @@ public function up(): void { Schema::table('sponsors', function (Blueprint $table) { - $table->json('license_data')->nullable()->after('license_number'); + if (!Schema::hasColumn('sponsors', 'license_data')) { + $table->json('license_data')->nullable()->after('license_number'); + } }); } @@ -22,7 +24,9 @@ public function up(): void public function down(): void { Schema::table('sponsors', function (Blueprint $table) { - $table->dropColumn('license_data'); + if (Schema::hasColumn('sponsors', 'license_data')) { + $table->dropColumn('license_data'); + } }); } };