feat: implement 3-level heavy equipment drilldown and transporter options in unit transfer
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('unit_transfers', function (Blueprint $table) {
|
||||
$table->string('transporter_type', 30)->default('internal')->after('user_id');
|
||||
$table->string('transporter_origin_location', 255)->nullable()->after('transporter_vehicle_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('unit_transfers', function (Blueprint $table) {
|
||||
$table->dropColumn(['transporter_type', 'transporter_origin_location']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('vehicles', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('vehicles', 'operational_group')) {
|
||||
$table->string('operational_group', 50)->nullable()->after('unit_type')->index();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('vehicles', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('vehicles', 'operational_group')) {
|
||||
$table->dropColumn('operational_group');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user