feat(11-01): add PAX8 subscription cost columns (migration 092)
- ALTER TABLE pax8_subscriptions to add price/partner_cost/currency - Additive, idempotent (IF NOT EXISTS), matches currency convention from 091 - Applied to dev DB via docker exec (Postgres init won't re-run on existing volume)
This commit is contained in:
parent
dc997f9629
commit
b0f6de0e8b
1 changed files with 20 additions and 0 deletions
20
migrations/092_pax8_subscription_costs.sql
Normal file
20
migrations/092_pax8_subscription_costs.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- PAX8 subscription cost columns.
|
||||
--
|
||||
-- PAX8's Subscription object (GET /subscriptions?page=&size=, Phase 11
|
||||
-- research, devx.pax8.com findsubscriptions) exposes both a customer/list
|
||||
-- `price` and a partner/reseller `partnerCost` per subscription, plus a
|
||||
-- `currencyCode`. Migration 091 did not model these — this migration adds
|
||||
-- them as additive columns on the existing pax8_subscriptions table (D-03).
|
||||
--
|
||||
-- Raw per-billing-period amounts are stored exactly as PAX8 returns them,
|
||||
-- paired with the existing billing_term column. Monthly normalization is a
|
||||
-- read-time concern, not modeled here (D-04).
|
||||
|
||||
ALTER TABLE pax8_subscriptions
|
||||
ADD COLUMN IF NOT EXISTS price NUMERIC(12,2);
|
||||
|
||||
ALTER TABLE pax8_subscriptions
|
||||
ADD COLUMN IF NOT EXISTS partner_cost NUMERIC(12,2);
|
||||
|
||||
ALTER TABLE pax8_subscriptions
|
||||
ADD COLUMN IF NOT EXISTS currency CHAR(3) NOT NULL DEFAULT 'USD';
|
||||
Loading…
Add table
Add a link
Reference in a new issue