mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
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:
@@ -83,12 +83,14 @@ VALUES (
|
|||||||
)
|
)
|
||||||
ON CONFLICT (id) DO NOTHING;
|
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 (
|
VALUES (
|
||||||
'00000000-0000-0000-0000-000000000002',
|
'00000000-0000-0000-0000-000000000002',
|
||||||
'default_user_group_id',
|
'default_user_group_id',
|
||||||
'"00000000-0000-0000-0000-000000000001"'::json,
|
'"00000000-0000-0000-0000-000000000001"'::json,
|
||||||
'Default unrestricted user group'
|
'Default unrestricted user group',
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
)
|
)
|
||||||
ON CONFLICT (key) DO NOTHING;
|
ON CONFLICT (key) DO NOTHING;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user