From 1d704fc32ca2f37c01f23e05a5a0ee9f139cf150 Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 25 Jul 2026 22:22:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(migration):=20=E6=96=B0=E5=A2=9E=E5=A2=9E?= =?UTF-8?q?=E9=87=8F=20migration=20=E8=A1=A5=E9=BD=90=20timer=5Fconfig=20?= =?UTF-8?q?=E4=B8=8E=20system=5Fhost=20=E7=BC=BA=E5=A4=B1=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 建表 migration(SystemTimerConfig/SystemHost)建表时未含动态管控新增字段(trigger_node_id/last_trigger_time/concurrency/is_master),全新安装走 migrate:run 会缺字段。新增 ALTER migration 增量补齐,保证全新安装表结构完整。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- ...20000_add_timer_dynamic_control_fields.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 database/migrations/20260725220000_add_timer_dynamic_control_fields.php diff --git a/database/migrations/20260725220000_add_timer_dynamic_control_fields.php b/database/migrations/20260725220000_add_timer_dynamic_control_fields.php new file mode 100644 index 0000000..f5be9f1 --- /dev/null +++ b/database/migrations/20260725220000_add_timer_dynamic_control_fields.php @@ -0,0 +1,29 @@ +table('system_timer_config') + ->addColumn('trigger_node_id', 'string', ['limit' => 100, 'null' => true, 'comment' => '手动触发目标节点ID']) + ->addColumn('last_trigger_time', 'integer', ['limit' => 11, 'null' => true, 'comment' => '手动触发设置时间戳,用于TTL自动复位', 'signed' => false]) + ->addColumn('concurrency', 'integer', ['limit' => 4, 'null' => true, 'comment' => '并发数:NULL=继承代码默认']) + ->update(); + + // system_host 补主节点标记 + $this->table('system_host') + ->addColumn('is_master', 'integer', ['limit' => 4, 'default' => 0, 'comment' => '是否主节点:0=否,1=是']) + ->update(); + } +}