ZIm/crates/collab/src
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
..
api collab: Add separate billing_customers table (#15457) 2024-07-29 22:48:21 -04:00
bin Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
db collab: Add separate billing_customers table (#15457) 2024-07-29 22:48:21 -04:00
rpc remoting: Allow Add/Remove remote folder (#14532) 2024-07-16 12:01:59 -06:00
tests collab: Add endpoint for initiating a billing subscription (#15452) 2024-07-29 17:31:36 -04:00
api.rs collab: Add endpoint for initiating a billing subscription (#15452) 2024-07-29 17:31:36 -04:00
auth.rs Upgrade base64 to v0.22 (#15304) 2024-07-26 17:40:38 -04:00
completion.rs Supermaven (#10788) 2024-05-03 12:50:42 -07:00
db.rs collab: Add separate billing_customers table (#15457) 2024-07-29 22:48:21 -04:00
env.rs Add an extensions API to the collaboration server (#7807) 2024-02-15 12:53:57 -08:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
executor.rs Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
lib.rs collab: Add endpoint for initiating a billing subscription (#15452) 2024-07-29 17:31:36 -04:00
main.rs fix: Typos (#15313) 2024-07-26 17:52:37 -07:00
rate_limiter.rs Fix logic errors in RateLimiter (#12421) 2024-05-29 12:05:40 +02:00
rpc.rs assistant: Allow guests to create new contexts on the host (#15439) 2024-07-29 12:01:09 -04:00
seed.rs Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
tests.rs Add the ability to edit remote directories over SSH (#14530) 2024-07-19 10:27:26 -07:00