From 300b4a3706e9f90fec9c1cea078910ddb67552e8 Mon Sep 17 00:00:00 2001 From: Owen Date: Sun, 8 Feb 2026 17:56:50 -0800 Subject: [PATCH] Set version when creating sub --- .../private/routers/billing/hooks/handleSubscriptionCreated.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/private/routers/billing/hooks/handleSubscriptionCreated.ts b/server/private/routers/billing/hooks/handleSubscriptionCreated.ts index 05b0c739..16b64145 100644 --- a/server/private/routers/billing/hooks/handleSubscriptionCreated.ts +++ b/server/private/routers/billing/hooks/handleSubscriptionCreated.ts @@ -69,7 +69,8 @@ export async function handleSubscriptionCreated( ? subscription.canceled_at : null, createdAt: subscription.created, - type: type + type: type, + version: 1 // we are hardcoding the initial version when the subscription is created, and then we will increment it on every update }; await db.insert(subscriptions).values(newSubscription);