Changes 0128092025
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('field_job_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('segment_id')->nullable()->constrained('segments')->nullOnDelete();
|
||||
$table->foreignId('initial_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
|
||||
$table->foreignId('asign_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
|
||||
$table->foreignId('complete_decision_id')->nullable()->constrained('decisions')->nullOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('field_job_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('field_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('field_job_setting_id')->constrained('field_job_settings')->cascadeOnDelete();
|
||||
$table->foreignId('asigned_user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->date('assigned_at')->nullable();
|
||||
$table->date('completed_at')->nullable();
|
||||
$table->date('cancelled_at')->nullable();
|
||||
$table->boolean('priority')->default(false);
|
||||
$table->string('notes', 255)->nullable();
|
||||
$table->jsonb('address_snapshot ')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('field_jobs');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user