1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2026-02-04 07:44:40 +00:00
Sunwuyuan 29030f90bd
fix: standardize device-related field names and timestamps across routes and utils
- Updated field names from camelCase to lowercase (e.g., deviceId to deviceid, createdAt to createdat) in auto-auth, device-auth, device, kv-token, and other related files.
- Adjusted database migration scripts to set default timestamps with timezone for createdat and updatedat fields in relevant tables.
- Ensured consistency in handling device-related data across the application.
2026-02-01 18:59:58 +08:00

20 lines
899 B
SQL

-- AlterTable
ALTER TABLE "account" ALTER COLUMN "createdat" SET DEFAULT timezone('Asia/Shanghai', now()),
ALTER COLUMN "updatedat" SET DEFAULT timezone('Asia/Shanghai', now());
-- AlterTable
ALTER TABLE "appinstall" ALTER COLUMN "installedat" SET DEFAULT timezone('Asia/Shanghai', now()),
ALTER COLUMN "updatedat" SET DEFAULT timezone('Asia/Shanghai', now());
-- AlterTable
ALTER TABLE "autoauth" ALTER COLUMN "createdat" SET DEFAULT timezone('Asia/Shanghai', now()),
ALTER COLUMN "updatedat" SET DEFAULT timezone('Asia/Shanghai', now());
-- AlterTable
ALTER TABLE "device" ALTER COLUMN "createdat" SET DEFAULT timezone('Asia/Shanghai', now()),
ALTER COLUMN "updatedat" SET DEFAULT timezone('Asia/Shanghai', now());
-- AlterTable
ALTER TABLE "kvstore" ALTER COLUMN "createdat" SET DEFAULT timezone('Asia/Shanghai', now()),
ALTER COLUMN "updatedat" SET DEFAULT timezone('Asia/Shanghai', now());