fix(migration): 修复行动收件箱菜单迁移 — 使用正确的 menus 表字段
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

This commit is contained in:
iven
2026-05-01 18:34:22 +08:00
parent 8e177ca705
commit 5261468953

View File

@@ -11,7 +11,7 @@ impl MigrationTrait for Migration {
db.execute_unprepared(
r#"
INSERT INTO menus (id, tenant_id, parent_id, title, path, icon, sort_order,
created_at, updated_at, is_active)
visible, menu_type, created_at, updated_at, created_by, updated_by, version)
SELECT
'b0000003-0000-7000-8000-000000000020'::uuid,
t.id,
@@ -20,7 +20,11 @@ impl MigrationTrait for Migration {
'/health/action-inbox',
'InboxOutlined',
36,
NOW(), NOW(), true
true, 'page',
NOW(), NOW(),
(SELECT id FROM users WHERE tenant_id = t.id LIMIT 1),
(SELECT id FROM users WHERE tenant_id = t.id LIMIT 1),
1
FROM tenants t
WHERE NOT EXISTS (
SELECT 1 FROM menus