Commit d578302
Expose updated_at on v_usdc_purchases view
v1_users_purchases.go SELECTs purchases_with_content.updated_at through
a CTE wrapping v_usdc_purchases. The view never exposed updated_at,
which crashes the /v1/users/{id}/purchases page with:
ERROR: column purchases_with_content.updated_at does not exist
(SQLSTATE 42703)
Alias sp.created_at as updated_at to keep the legacy API contract
intact. The legacy usdc_purchases table set both columns to
CURRENT_TIMESTAMP at insert and never updated rows, so
created_at = updated_at in practice.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 05b43df commit d578302
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9631 | 9631 | | |
9632 | 9632 | | |
9633 | 9633 | | |
| 9634 | + | |
9634 | 9635 | | |
9635 | 9636 | | |
9636 | 9637 | | |
| |||
0 commit comments