<?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
    {
         $sql = <<<'SQL'
            ALTER TABLE mfm_parameters
            ADD COLUMN device_master_id BIGINT NOT NULL,
            ADD CONSTRAINT mfm_parameters_device_master_id_fkey
            FOREIGN KEY (device_master_id) REFERENCES device_masters(id);
        SQL;

        DB::statement($sql);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Schema::table('mfm_parameters', function (Blueprint $table) {
        //     //
        // });
    }
};
