<?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('devices', function (Blueprint $table) {
            $table->integer('speed_limit')->nullable()->after('device_profile_id');
            $table->integer('torque_limit')->nullable()->after('speed_limit');
            $table->integer('power_limit')->nullable()->after('torque_limit');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('devices', function (Blueprint $table) {
            $table->dropColumn(['speed_limit', 'torque_limit', 'power_limit']);
        });
    }
};
