Fix ensureBootstrapAdmin: cast $1 to uuid and target_id to text
The audit_events insert in the bootstrap path was reusing $1 for both user_id (uuid) and target_id (text), which Postgres rejected with "inconsistent types deduced for parameter $1". The whole transaction rolled back, so the bootstrap user never got created on fresh installs and the operator hit "Invalid email or password" on first sign-in with no other diagnostic. Use two separate parameters with explicit casts. The metadata cast to jsonb stays.
| Repository | cpatpa/PIP |
|---|---|
| Author | Claude <noreply@anthropic.com> |
| Authored | |
| Parents | 510c379c |
| Stats | 1 file changed , +6 , -2 |
| Part of | Bootstrap admin password seeding (installer + backend) |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-35e409f6.md
from inside the repo you want the change in.