fix(migrations): explicitly set timestamps in system_configs insert

老库的 created_at/updated_at 没有 DEFAULT now(),依赖默认值会写入 NULL
触发 NOT NULL 约束失败,改为显式传入 now() 与 sqlite/mysql 版本保持一致
This commit is contained in:
fawney19
2026-05-11 03:22:04 +08:00
parent 40470d8ca5
commit e91c874863

View File

@@ -83,12 +83,14 @@ VALUES (
)
ON CONFLICT (id) DO NOTHING;
INSERT INTO public.system_configs (id, key, value, description)
INSERT INTO public.system_configs (id, key, value, description, created_at, updated_at)
VALUES (
'00000000-0000-0000-0000-000000000002',
'default_user_group_id',
'"00000000-0000-0000-0000-000000000001"'::json,
'Default unrestricted user group'
'Default unrestricted user group',
now(),
now()
)
ON CONFLICT (key) DO NOTHING;