2024_05_21_113147_alter_table_dossier.php
1 <?php 2 3 use App\Models\Document; 4 use App\Models\Dossier; 5 use Illuminate\Database\Migrations\Migration; 6 use Illuminate\Database\Schema\Blueprint; 7 use Illuminate\Support\Facades\Schema; 8 9 return new class extends Migration 10 { 11 /** 12 * Run the migrations. 13 * 14 * @return void 15 */ 16 public function up() 17 { 18 Schema::table('dossiers', function (Blueprint $table) { 19 $table->string('etr_name')->nullable(); 20 $table->string('st_name')->nullable(); 21 $table->string('code_report_lab')->nullable(); 22 $table->foreignIdFor(Document::class, 'iar_document_id')->nullable(); //${dossier.IARDocument.DESCRIPTION} 23 $table->foreignIdFor(Dossier::class, 'original_dossier_id')->nullable(); //${dossier.relatedDossiers} 24 }); 25 } 26 27 /** 28 * Reverse the migrations. 29 * 30 * @return void 31 */ 32 public function down() 33 { 34 // 35 } 36 };