Set version when creating sub

This commit is contained in:
Owen
2026-02-08 17:56:50 -08:00
parent 81ef2db7f8
commit 300b4a3706

View File

@@ -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);