32 lines
		
	
	
		
			770 B
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			770 B
		
	
	
	
		
			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('jobs', function (Blueprint $table) {
 | |
|             $table->id();
 | |
|             $table->unsignedBigInteger('computer_id');
 | |
|             $table->foreign('computer_id')->references('id')->on('computers');
 | |
|             $table->string('description', length: 256);
 | |
|             $table->boolean('status')->default(false);
 | |
|             $table->timestamps();
 | |
|         });
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Reverse the migrations.
 | |
|      */
 | |
|     public function down(): void
 | |
|     {
 | |
|         Schema::dropIfExists('jobs');
 | |
|     }
 | |
| };
 |