38 lines
968 B
PHP
38 lines
968 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('Lampiran', function (Blueprint $table) {
|
|
$table->id('LampiranId');
|
|
$table->unsignedInteger('PelaporanId');
|
|
$table->integer('IpalId')->nullable();
|
|
$table->unsignedInteger('KomponenId');
|
|
$table->string('Dokumen', 255);
|
|
$table->dateTime('TanggalUnggah');
|
|
$table->unsignedInteger('CerobongId')->nullable();
|
|
|
|
// Indexes
|
|
$table->index('PelaporanId', 'index_PelaporanId');
|
|
$table->index('KomponenId', 'index_KomponenId');
|
|
});
|
|
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('Lampiran');
|
|
}
|
|
};
|