<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement("CREATE TABLE `ufutx_s2_load_average_logs` (
  `id` bigint(20) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
  `m1` float NOT NULL COMMENT '1分钟负载',
  `m5` float NOT NULL COMMENT '5分钟负载',
  `m15` float NOT NULL COMMENT '15分钟负载',
  `ip` varchar(64) NOT NULL,
  `content` text NOT NULL COMMENT 'top详情',
  `create_time` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务器负载记录表';");
    }

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