Note that the seeded 'local' row reappears after a migration

Claude-Session: https://claude.ai/code/session_016y6gyuHkQXPiEuW8RGQyua
This commit is contained in:
prosolis
2026-07-27 07:53:06 -07:00
parent 84ee6bfb9c
commit ddc4164228
+7
View File
@@ -275,6 +275,13 @@ one transaction with foreign keys off, and verifies the row counts before it
commits. It refuses to run while anything else has the database open, and commits. It refuses to run while anything else has the database open, and
refuses to merge into an account that already owns writing. refuses to merge into an account that already owns writing.
**`local` comes back, and that's expected.** `db.Open` seeds that row on every
startup, so it reappears the moment Petal restarts after a migration. It owns
nothing — the writing is on the real account — and it is only ever resolved to
by `StaticResolver`, which a deployment with `AUTHENTIK_*` set never uses. Check
`SELECT COUNT(*) FROM documents WHERE user_id = 'local'` if you want to be sure
a migration took; the presence of the row itself says nothing.
--- ---
## 5. Backups ## 5. Backups