From 9d403d1e4113cab732af59f4d0d9d46e877ba93a Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 9 Oct 2025 23:51:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=8A=82=E7=82=B9=E8=A1=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20250823224531_system_host.php | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/database/migrations/20250823224531_system_host.php b/database/migrations/20250823224531_system_host.php index 9d69e4f..694d1d6 100644 --- a/database/migrations/20250823224531_system_host.php +++ b/database/migrations/20250823224531_system_host.php @@ -1,7 +1,6 @@ table('system_host') ->setComment('系统节点表') - ->addColumn('node_id', 'string', ['limit' => '100', 'null' => '0', 'comment' => '节点ID {text}', ]) - ->addColumn('ip_address', 'string', ['limit' => '45', 'null' => '1', 'comment' => 'IP地址 {text}', ]) - ->addColumn('status', 'integer', ['limit' => '1', 'null' => '0', 'default' => '1', 'comment' => '状态 {switch} (0:离线,1:在线)', ]) - ->addColumn('last_heartbeat_at', 'datetime', ['null' => '1', 'comment' => '最后心跳时间 {date}', ]) - ->addColumn('os_info', 'string', ['limit' => '255', 'null' => '1', 'comment' => '系统信息 {text}', ]) - ->addColumn('php_version', 'string', ['limit' => '50', 'null' => '1', 'comment' => 'PHP版本 {text}', ]) - ->addColumn('cpu_load', 'string', ['limit' => '50', 'null' => '1', 'comment' => 'CPU负载 {text}', ]) - ->addColumn('memory_usage', 'biginteger', ['null' => '1', 'comment' => '内存占用(byte) {text}', ]) - ->addColumn('disk_free', 'biginteger', ['null' => '1', 'comment' => '磁盘可用空间(byte) {text}', ]) - ->addColumn('disk_total', 'biginteger', ['null' => '1', 'comment' => '磁盘总空间(byte) {text}', ]) - ->addColumn('create_time', 'int unsigned', ['null' => '1', 'comment' => '首次运行时间 {date}', ]) - ->addColumn('update_time', 'int unsigned', ['null' => '1', 'comment' => '更新时间 {date}', ]) - ->addIndex('node_id',['unique'=>true]) + ->addColumn('node_id', 'string', ['limit' => '100', 'null' => '0', 'comment' => '节点ID {text}']) + ->addColumn('ip_address', 'string', ['limit' => '45', 'null' => '1', 'comment' => 'IP地址 {text}']) + ->addColumn('status', 'integer', ['limit' => '1', 'null' => '0', 'default' => '1', 'comment' => '状态 {switch} (0:离线,1:在线)']) + ->addColumn('last_heartbeat_at', 'datetime', ['null' => '1', 'comment' => '最后心跳时间 {date}']) + ->addColumn('os_info', 'string', ['limit' => '255', 'null' => '1', 'comment' => '系统信息 {text}']) + ->addColumn('php_version', 'string', ['limit' => '50', 'null' => '1', 'comment' => 'PHP版本 {text}']) + ->addColumn('cpu_load', 'string', ['limit' => '50', 'null' => '1', 'comment' => 'CPU负载 {text}']) + ->addColumn('memory_usage', 'biginteger', ['null' => '1', 'comment' => '内存占用(byte) {text}']) + ->addColumn('disk_free', 'biginteger', ['null' => '1', 'comment' => '磁盘可用空间(byte) {text}']) + ->addColumn('disk_total', 'biginteger', ['null' => '1', 'comment' => '磁盘总空间(byte) {text}']) + ->addColumn('create_time', 'int', ['null' => '1', 'signed' => '0', 'comment' => '首次运行时间 {date}']) + ->addColumn('update_time', 'int', ['null' => '1', 'signed' => '0', 'comment' => '更新时间 {date}']) + ->addIndex('node_id', ['unique' => true]) ->create(); } }