collab: Limit customers to one free trial (#29232)
This PR makes it so customers can only subscribe to the trial once. Release Notes: - N/A
This commit is contained in:
parent
abf2b9d7d3
commit
a0eaede13d
5 changed files with 36 additions and 3 deletions
|
@ -492,7 +492,8 @@ CREATE TABLE IF NOT EXISTS billing_customers (
|
|||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
user_id INTEGER NOT NULL REFERENCES users (id),
|
||||
has_overdue_invoices BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
stripe_customer_id TEXT NOT NULL
|
||||
stripe_customer_id TEXT NOT NULL,
|
||||
trial_started_at TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX "uix_billing_customers_on_user_id" ON billing_customers (user_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue