collab: Add has_overdue_invoices
to billing_customers
(#24239)
This PR adds a new `has_overdue_invoices` field to the `billing_customers` table. This will be used to statefully track whether a customer has overdue invoices, and also to reset it when the invoices are paid. We will set this field to `true` when a subscription is canceled with the reason `payment_failed`. Release Notes: - N/A
This commit is contained in:
parent
b13498a5dd
commit
aa3da35e8e
5 changed files with 27 additions and 0 deletions
|
@ -430,6 +430,7 @@ CREATE TABLE IF NOT EXISTS billing_customers (
|
|||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
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
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue