35 lines
		
	
	
		
			1006 B
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1006 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::table('profile', function (Blueprint $table) {
 | 
						|
            $table->integer('ms_provinsi_id');
 | 
						|
            $table->integer('ms_kabupaten_id');
 | 
						|
            $table->integer('ms_sekolah_id');
 | 
						|
 | 
						|
            $table->foreign('ms_provinsi_id')->references('MsProvinsiId')->on('ms_provinsi')->onDelete('cascade');
 | 
						|
            $table->foreign('ms_kabupaten_id')->references('MsKabupatenId')->on('ms_kabupaten')->onDelete('cascade');
 | 
						|
            $table->foreign('ms_sekolah_id')->references('MsSekolahId')->on('ms_sekolah')->onDelete('cascade');
 | 
						|
        });
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Reverse the migrations.
 | 
						|
     */
 | 
						|
    public function down(): void
 | 
						|
    {
 | 
						|
        Schema::table('profile', function (Blueprint $table) {
 | 
						|
            //
 | 
						|
        });
 | 
						|
    }
 | 
						|
};
 |