Files
member-console/internal/billing/queries/invoice_line_items.sql
T
cgalo5758 b0072d8971 Consolidate domain tables into core schema
Squash the pre-production migration history into fresh core, fedwiki,
and stripe baselines and reduce the canonical source list to those
three streams.

Update sqlc configs, generated queries, raw SQL, tests, and docs while
keeping provider tables schema-qualified.

BREAKING: existing local database volumes must be wiped because goose
version history restarts from the new baselines.
2026-07-05 20:10:23 -05:00

14 lines
387 B
SQL

-- name: CreateInvoiceLineItem :one
INSERT INTO core.invoice_line_items (
invoice_id, subscription_item_id, price_id,
amount, currency, description, quantity,
period_start, period_end
)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
RETURNING *;
-- name: GetInvoiceLineItemsByInvoiceID :many
SELECT * FROM core.invoice_line_items
WHERE invoice_id = $1
ORDER BY created_at ASC;