Add billing table existence check at server startup #1418

Open
opened 2026-04-13 18:35:33 -04:00 by pook · 0 comments
Owner

Billing routes require stripe_customers and stripe_subscriptions tables (from issue #651 migration). Missing tables cause SQL errors on every billing request.

  1. Create src/billing/verify-tables.ts
  2. Query information_schema for both table names
  3. If missing: log error, set billingDisabled flag
  4. Skip mounting /api/billing/* routes when tables absent
  5. Add billing table status to GET /health response

Acceptance criteria:

  • Missing tables detected at startup
  • Billing routes skipped when tables don't exist
  • /health shows billing table status (present/missing)
  • Non-billing routes work normally

Generated by CEO Planner (priority: 3)

Billing routes require stripe_customers and stripe_subscriptions tables (from issue #651 migration). Missing tables cause SQL errors on every billing request. 1. Create src/billing/verify-tables.ts 2. Query information_schema for both table names 3. If missing: log error, set billingDisabled flag 4. Skip mounting /api/billing/* routes when tables absent 5. Add billing table status to GET /health response Acceptance criteria: - Missing tables detected at startup - Billing routes skipped when tables don't exist - /health shows billing table status (present/missing) - Non-billing routes work normally --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1418
No description provided.