From bc31ce9e37c913dda8c11a99b927932244a0cdc1 Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Wed, 23 Jul 2025 09:03:16 +0330 Subject: [PATCH] add column to province table --- .../2025_04_28_101821_create_provinces_table.php | 2 -- ...025_07_21_094121_add_column_to_provinces_table.php} | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename database/migrations/{2025_07_21_094121_create_expert_performances_table.php => 2025_07_21_094121_add_column_to_provinces_table.php} (57%) diff --git a/database/migrations/2025_04_28_101821_create_provinces_table.php b/database/migrations/2025_04_28_101821_create_provinces_table.php index b2a5d64..1c2a32b 100644 --- a/database/migrations/2025_04_28_101821_create_provinces_table.php +++ b/database/migrations/2025_04_28_101821_create_provinces_table.php @@ -16,8 +16,6 @@ return new class extends Migration $table->string('name'); $table->double('lat'); $table->double('lon'); - $table->string('ip'); - $table->string('camera_ip'); $table->timestamps(); }); } diff --git a/database/migrations/2025_07_21_094121_create_expert_performances_table.php b/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php similarity index 57% rename from database/migrations/2025_07_21_094121_create_expert_performances_table.php rename to database/migrations/2025_07_21_094121_add_column_to_provinces_table.php index 2a0b866..3181646 100644 --- a/database/migrations/2025_07_21_094121_create_expert_performances_table.php +++ b/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php @@ -11,9 +11,9 @@ return new class extends Migration */ public function up(): void { - Schema::create('expert_performances', function (Blueprint $table) { - $table->id(); - $table->timestamps(); + Schema::create('provinces', function (Blueprint $table) { + $table->string('ip'); + $table->string('camera_ip'); }); } @@ -22,6 +22,8 @@ return new class extends Migration */ public function down(): void { - Schema::dropIfExists('expert_performances'); + Schema::table('provinces', function (Blueprint $table) { + $table->dropColumn(['ip', 'camera_ip']); + }); } };