Commit 76c5447
authored
fix(db): complete artifact intent insert acl (#148)
## Summary
- add the missing column-level `INSERT` grant for
`v2_artifact_upload_intents.quiesced_at` to the single clean baseline
- assert that exact grant in production schema validation
- assert that the agent role still has no table-wide update access
## Why
Drizzle emits the nullable `quiesced_at` column as `DEFAULT` when
reserving an artifact upload. PostgreSQL therefore requires column-level
insert permission even though application code omits the field.
Production logs showed this exact permission failure after the preceding
ownership-query corrections.
## Production application
The grant and the one-row Drizzle baseline checksum were updated
atomically under the database maintenance advisory lock. The production
ledger still contains exactly one migration row.
## Verification
- production contract dry-run passes
- production `app_agent` can insert `quiesced_at`
- production `app_agent` still cannot update the table broadly
- `pnpm typecheck:scripts`
- `pnpm turbo lint`
- `pnpm --filter @cheatcode/db db:generate` reports no schema changes1 parent 6efb6a9 commit 76c5447
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3403 | 3403 | | |
3404 | 3404 | | |
3405 | 3405 | | |
3406 | | - | |
| 3406 | + | |
3407 | 3407 | | |
3408 | 3408 | | |
3409 | 3409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
| |||
0 commit comments