fix: align management token oauth permissions and jsonb schema

This commit is contained in:
Entropy.Xu
2026-05-10 01:47:48 +08:00
parent 4a64d078f3
commit 545299fc62
11 changed files with 308 additions and 21 deletions

View File

@@ -123,8 +123,8 @@ VALUES (
$4,
$5,
$6,
$7,
$8,
$7::jsonb,
$8::jsonb,
CASE
WHEN $9::bigint IS NULL THEN NULL
ELSE to_timestamp($9::double precision)
@@ -158,10 +158,10 @@ SET name = COALESCE($2, name),
END,
allowed_ips = CASE
WHEN $5 THEN NULL
WHEN $6::json IS NULL THEN allowed_ips
ELSE $6
WHEN $6::jsonb IS NULL THEN allowed_ips
ELSE $6::jsonb
END,
permissions = COALESCE($7::json, permissions),
permissions = COALESCE($7::jsonb, permissions),
expires_at = CASE
WHEN $8 THEN NULL
WHEN $9::bigint IS NULL THEN expires_at