From 7a761b4fb5b53e8faff21a185beeb8ea82af6a24 Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Wed, 1 Jan 2025 16:42:20 +0330 Subject: [PATCH] fix the migration type --- ...1_133123_add_column_to_road_patrols_table.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/database/migrations/2024_12_31_133123_add_column_to_road_patrols_table.php b/database/migrations/2024_12_31_133123_add_column_to_road_patrols_table.php index 47cbc9dd..9dcd85bc 100644 --- a/database/migrations/2024_12_31_133123_add_column_to_road_patrols_table.php +++ b/database/migrations/2024_12_31_133123_add_column_to_road_patrols_table.php @@ -12,10 +12,10 @@ return new class extends Migration public function up(): void { Schema::table('road_patrols', function (Blueprint $table) { - $table->decimal('start_lat', 12, 10)->nullable()->change(); - $table->decimal('start_lng', 12, 10)->nullable()->change(); - $table->decimal('end_lat', 12, 10)->nullable()->change(); - $table->decimal('end_lng', 12, 10)->nullable()->change(); + $table->double('start_lat', null, 0)->nullable()->change(); + $table->double('start_lon', null, 0)->nullable()->change(); + $table->double('end_lat', null, 0)->nullable()->change(); + $table->double('end_lon', null, 0)->nullable()->change(); $table->integer('fuel_consumption')->nullable(); $table->integer('vehicle_runtime')->nullable(); $table->json('stop_points')->nullable(); @@ -28,10 +28,10 @@ return new class extends Migration public function down(): void { Schema::table('road_patrols', function (Blueprint $table) { - $table->decimal('start_lat', 12, 10)->change(); - $table->decimal('start_lng', 12, 10)->change(); - $table->decimal('end_lat', 12, 10)->change(); - $table->decimal('end_lng', 12, 10)->change(); + $table->double('start_lat', null, 0)->change(); + $table->double('start_lon', null, 0)->change(); + $table->double('end_lat', null, 0)->change(); + $table->double('end_lon', null, 0)->change(); $table->dropColumn('fuel_consumption'); $table->dropColumn('vehicle_runtime'); $table->dropColumn('stop_points');