You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							36 lines
						
					
					
						
							985 B
						
					
					
				
			
		
		
	
	
							36 lines
						
					
					
						
							985 B
						
					
					
				| <?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('dags', function (Blueprint $table) {
 | |
|             $table->id();
 | |
|             $table->unsignedBigInteger('user_id');
 | |
|             $table->foreignId('airflow_id')->constrained('airflows')->onDelete('cascade');
 | |
|             $table->string('name');
 | |
|             $table->string('description')->nullable();
 | |
|             $table->string('file_path');
 | |
|             $table->enum('status', ['pending', 'approved', 'rejected'])->default('pending');
 | |
| 
 | |
|             $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
 | |
|             $table->timestamps();
 | |
|         });
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Reverse the migrations.
 | |
|      */
 | |
|     public function down(): void
 | |
|     {
 | |
|         Schema::dropIfExists('dags');
 | |
|     }
 | |
| };
 |