Files
Agent-System/deploy/postgres/goose/00064_2026-09-23-user-profile-admin-edit.sql
T
WeiCHEN 6d3efdf4d7 feat(auth): show real names in duty pickers and enable profile edits
Add a login-visible user directory API and admin/self profile update
paths so project duty selectors stop falling back to "用户 N", and so
users can persist display fields with an admin-edit tip.
2026-09-23 09:39:41 +08:00

11 lines
508 B
SQL

-- +goose Up
-- Track when an admin last edited another user's display profile (name/dept/email/employee_id).
-- Self-edits clear both columns so the user tip disappears after they save their own profile.
ALTER TABLE users ADD COLUMN IF NOT EXISTS profile_updated_by BIGINT REFERENCES users(id);
ALTER TABLE users ADD COLUMN IF NOT EXISTS profile_updated_at TIMESTAMPTZ;
-- +goose Down
ALTER TABLE users DROP COLUMN IF EXISTS profile_updated_by;
ALTER TABLE users DROP COLUMN IF EXISTS profile_updated_at;