feat(db/m7-user-mgmt): migration 0023 + admin-user CRUD queries
Adds users.auto_approve_requests boolean default false (the #355 sub-feature surface; the request-flow handler that honors this flag is U2.5 follow-up work). Four new sqlc queries for the U2 admin endpoints: - CreateUserAdmin: admin-driven user creation, accepts all five fields explicitly. - DeleteUser: hard delete; schema's ON DELETE CASCADE foreign keys handle plays/likes/sessions cleanup. Last-admin guard lives in the HTTP layer (next task). - ResetUserPassword: admin sets a new hashed password without knowing the old one. - UpdateUserAutoApprove: toggles the new boolean. Self-service equivalents (knows-current-password change, etc.) are U3 work and use distinct queries.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE users DROP COLUMN IF EXISTS auto_approve_requests;
|
||||
Reference in New Issue
Block a user