<?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_table22', function (Blueprint $table) {
            $table->id('DatasetTable22Id');
            $table->integer('dataset_id');
            $table->string('lokasi')->nullable();
            $table->date('waktu')->nullable();
            $table->string('lat')->nullable();
            $table->string('long')->nullable();
            $table->string('tempratur')->nullable();
            $table->string('ph')->nullable();
            $table->string('kekeruhan')->nullable();
            $table->string('warna')->nullable();
            $table->string('rasa')->nullable();
            $table->string('bau')->nullable();
            $table->string('tds')->nullable();
            $table->string('bod')->nullable();
            $table->string('cod')->nullable();
            $table->string('do')->nullable();
            $table->string('fosfat')->nullable();
            $table->string('no3')->nullable();
            $table->string('nh3')->nullable();
            $table->string('arsen')->nullable();
            $table->string('kobalt')->nullable();
            $table->string('barium')->nullable();
            $table->string('boron')->nullable();
            $table->string('selenium')->nullable();
            $table->string('kadmium')->nullable();
            $table->string('khrom')->nullable();
            $table->string('tembaga')->nullable();
            $table->string('besi')->nullable();
            $table->string('timbal')->nullable();
            $table->string('mangan')->nullable();
            $table->string('air_raksa')->nullable();
            $table->string('seng')->nullable();
            $table->string('khlorida')->nullable();
            $table->string('sianida')->nullable();
            $table->string('fluorida')->nullable();
            $table->string('nitrit')->nullable();
            $table->string('sulfat')->nullable();
            $table->string('khlorin_bebas')->nullable();
            $table->string('belereng')->nullable();
            $table->string('fecal_coliform')->nullable();
            $table->string('total_coliform')->nullable();
            $table->string('gross')->nullable();
            $table->string('grossb')->nullable();
            $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_table22s');
    }
};
