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');