42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?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::create('missions', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('user_id')->constrained('users');
|
|
$table->foreignId('machine_id')->nullable()->constrained('cmms_machines');
|
|
$table->foreignId('rahdar_id')->constrained('rahdaran');
|
|
$table->foreignId('state_id')->constrained('mission_states');
|
|
$table->string('state_name');
|
|
$table->string('requested_machine_type');
|
|
$table->integer('requested_machine_numbers');
|
|
$table->string('type');
|
|
$table->dateTime('start_date');
|
|
$table->dateTime('end_date');
|
|
$table->dateTime('request_date');
|
|
$table->text('description')->nullable();
|
|
$table->string('start_point');
|
|
$table->string('end_point');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('missions');
|
|
}
|
|
};
|