<?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('dataset_table38', function (Blueprint $table) {
            $table->id('DatasetTable38Id');
            $table->integer('dataset_id');
            $table->float('minyak_bakar')->default(0);
            $table->float('minyak_diesel')->default(0);
            $table->float('minyak_tanah')->default(0);
            $table->float('gas')->default(0);
            $table->float('batubara')->default(0);
            $table->float('lpg')->default(0);
            $table->float('briket')->default(0);
            $table->float('kayu_bakar')->default(0);
            $table->float('biomassa')->default(0);
            $table->float('bensin')->default(0);
            $table->float('solar')->default(0);
            $table->integer('created_by');
            $table->timestampsTz();
            $table->softdeletesTz();

            $table->foreign('dataset_id')->references('DatasetId')->on('dataset')->cascadeOnDelete();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('dataset_table38s');
    }
};
