10 lines
331 B
SQL
10 lines
331 B
SQL
-- name: CreateSubscriptionChange :one
|
|
INSERT INTO billing.subscription_changes (subscription_id, previous_status, new_status, stripe_event_id)
|
|
VALUES ($1, $2, $3, $4)
|
|
RETURNING *;
|
|
|
|
-- name: GetSubscriptionChangesBySubscriptionID :many
|
|
SELECT * FROM billing.subscription_changes
|
|
WHERE subscription_id = $1
|
|
ORDER BY changed_at ASC;
|