Login Account Admin Repository And Cascades
The login account admin repository owns operator mutations for accounts, starter characters, admin flags, audits, and destructive account cleanup.
How It Works
Admin handlers call repository methods that run schema readiness checks, perform transactional account creation or repair, seed starter characters, update admin flags, and write audit rows. Database cascades own deletion cleanup for dependent account data.
The repository is the boundary that keeps admin operations from bypassing login-server invariants.
How To Use It
Use repository operations for account creation, starter-character repair, admin flag changes, and account deletion. Do not edit account tables directly from tools unless the repository has no supported path and a migration or repair command is being written.
Review active session counts before destructive operations.
Invariants
Required migrations must be present before admin operations run. Starter-character seeding should be transactional with account creation or repair. Admin flag changes and destructive actions should emit audit rows. Cascades must match the data the operation claims to delete.
Debugging
Schema drift failures point to missing migrations or readiness constants. Missing starter characters usually mean seeding or repair did not run in the expected transaction. Deletion surprises should be investigated through cascade definitions and admin audit rows.