From b6ada3fc4b15a526485352774274a4c2087a29b0 Mon Sep 17 00:00:00 2001 From: pavithrak27 Date: Wed, 24 Jun 2026 22:17:38 +0530 Subject: [PATCH] fixed api issue --- ...4_211842_add_emirates_id_gender_to_tables.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/database/migrations/2026_06_24_211842_add_emirates_id_gender_to_tables.php b/database/migrations/2026_06_24_211842_add_emirates_id_gender_to_tables.php index f3c17f6..7bea68f 100644 --- a/database/migrations/2026_06_24_211842_add_emirates_id_gender_to_tables.php +++ b/database/migrations/2026_06_24_211842_add_emirates_id_gender_to_tables.php @@ -12,10 +12,14 @@ public function up(): void { Schema::table('sponsors', function (Blueprint $table) { - $table->string('emirates_id_gender')->nullable()->after('emirates_id_nationality'); + if (!Schema::hasColumn('sponsors', 'emirates_id_gender')) { + $table->string('emirates_id_gender')->nullable()->after('emirates_id_nationality'); + } }); Schema::table('employer_profiles', function (Blueprint $table) { - $table->string('emirates_id_gender')->nullable()->after('emirates_id_nationality'); + if (!Schema::hasColumn('employer_profiles', 'emirates_id_gender')) { + $table->string('emirates_id_gender')->nullable()->after('emirates_id_nationality'); + } }); } @@ -25,10 +29,14 @@ public function up(): void public function down(): void { Schema::table('sponsors', function (Blueprint $table) { - $table->dropColumn('emirates_id_gender'); + if (Schema::hasColumn('sponsors', 'emirates_id_gender')) { + $table->dropColumn('emirates_id_gender'); + } }); Schema::table('employer_profiles', function (Blueprint $table) { - $table->dropColumn('emirates_id_gender'); + if (Schema::hasColumn('employer_profiles', 'emirates_id_gender')) { + $table->dropColumn('emirates_id_gender'); + } }); } };