ZIm/crates/collab/src/api
Marshall Bowers 28c14cdee4
collab: Add separate billing_customers table (#15457)
This PR adds a new `billing_customers` table to hold the billing
customers.

Previously we were storing both the `stripe_customer_id` and
`stripe_subscription_id` in the `billable_subscriptions` table. However,
this creates problems when we need to correlate subscription events back
to the subscription record, as we don't know the user that the Stripe
event corresponds to.

By moving the `stripe_customer_id` to a separate table we can create the
Stripe customer earlier in the flow—before we create the Stripe Checkout
session—and associate that customer with a user. This way when we
receive events down the line we can use the Stripe customer ID to
correlate it back to the user.

We're doing some destructive actions to the `billing_subscriptions`
table, but this is fine, as we haven't started using them yet.

Release Notes:

- N/A
2024-07-29 22:48:21 -04:00
..
billing.rs collab: Add separate billing_customers table (#15457) 2024-07-29 22:48:21 -04:00
contributors.rs collab: Extract contributor endpoints to their own module (#15251) 2024-07-25 23:02:32 -04:00
events.rs Add repl events (#15259) 2024-07-26 03:31:41 -04:00
extensions.rs collab: Fix exact extension filtering (#14591) 2024-07-16 15:18:48 -04:00
ips_file.rs Extract SemanticVersion into its own crate (#9956) 2024-03-29 12:11:57 -04:00
slack.rs Upload crashes to collab directly (#8649) 2024-03-01 13:23:44 -07:00