Skip to content

Commit 67f6be3

Browse files
rickyromboclaude
andcommitted
Expose updated_at on v_usdc_purchases view
Two reader routes (v1_users_purchases, v1_users_sales) return updated_at in their JSON payload. Alias sp.created_at to keep the API contract intact — the legacy table sets both columns to CURRENT_TIMESTAMP at insert and never updates rows, so created_at = updated_at in practice. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent a563dc8 commit 67f6be3

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

api/dbv1/models.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ddl/views/v_usdc_purchases.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SELECT
1313
sp.content_type::usdc_purchase_content_type AS content_type,
1414
sp.content_id,
1515
sp.created_at,
16+
sp.created_at AS updated_at,
1617
GREATEST(
1718
sp.amount - COALESCE(
1819
CASE sp.content_type

sql/01_schema.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12913,6 +12913,7 @@ CREATE VIEW public.v_usdc_purchases AS
1291312913
(sp.content_type)::public.usdc_purchase_content_type AS content_type,
1291412914
sp.content_id,
1291512915
sp.created_at,
12916+
sp.created_at AS updated_at,
1291612917
GREATEST(
1291712918
sp.amount - COALESCE(
1291812919
CASE sp.content_type

0 commit comments

Comments
 (0)