# Upgrading to 1.1.0

This page lists what changed since the previous release; see the [upgrade procedure](README.md).

## Apply native forward 151

This minor set admits whole-day subscription cadences from 1 through 3660;
each application still chooses its offered cadences.

| Slot | Migration | Application |
| --- | --- | --- |
| 151 | `20261122190000_subscription_cadence_bound.sql` | Widens the native edit-quote CHECK and the actor/command preview upper bounds. |

Use the complete selected native catalogue and the existing
[database migration procedure](database-migrations.md). Construct
`createPlatformPostgresMigrationRunner` from `@openlup/platform/migrations`,
inspect `status()`, review `apply({ dryRun: true })`, explicitly call `apply()`,
then confirm no pending paths. Apply forward 151 before offering longer
cadences. It takes the usual table DDL lock; plan around concurrent edits.
No stored rows are changed. Preserve applied bytes and history; unbind longer
offers before rolling application composition back. The managed chain receives
no migration. Imports and package installation apply no SQL.

## Starter policy configuration

Starters from 0.43.0 first follow
[Starter applications from 0.43.0](v1-0-0.md#starter-applications-from-0430).
For a 1.1.0 target, both 0.43.0 and 1.0.0 starters must also migrate
`owned/renewal.config.ts` before applying managed files. An uncustomized file
takes the target extraction's bytes. For a customized file, add
`subscriptionCare.retention` with `offerByReason` and `defaultOffer`, preserving
local reasons, timing and other values. The default mapping is
`{ offerByReason: { too_much_product: 'skip', delivery_issue: 'reschedule' }, defaultOffer: 'pause' }`.
Every mapped reason must be in `retentionReasons`; each offer and default must
be `skip`, `reschedule` or `pause`. Invalid policy refuses startup with
`starter_retention_configuration_invalid`.

Keep a three-rung positive `retryBackoffHours` ladder and preserve its configured
hours. Other lengths now refuse startup with `starter_database_retry_budget`
because the database exhausts on attempt four. The provider-recorded failure
path retains its SQL defaults `[24,72,168]`; this release installs no different
retry policy. The target's helper imports from `shared/policy.ts` are optional
for an existing configuration: `shared/subscription-offer.ts` still re-exports
the numeric helpers. No `owned/store.config.ts` edit is required for a 1.0.0
starter; the retention member above is its only required owned-contract change.

## @openlup/core

- docs: document the required owned-file migration from the 0.43.0 starter,
  using target-only snapshot entries and the existing installed upgrade CLI.
  The published 1.0.0 set did not pass exact-set qualification for starter
  upgrades and is superseded by 1.1.0; 1.1.0 qualification is recorded after
  publication. This migration guide changes no runtime or SQL.

Migration: Starter applications from 0.43.0 must add `owned/quote-shipping.ts`,
`owned/renewal-policy.ts` and `owned/catalogue.json` only to the target snapshot,
and migrate the contracts in `owned/store.config.ts`, `owned/quote-copy.ts`,
`owned/subscription-editing.ts` and `owned/catalogue.ts` before applying managed
files. Use the target extraction's bytes for pristine files; preserve local
values when adapting customized files. Follow the starter section in the
1.0.0 upgrade guide shipped with this set. Npm-only applications require no
owned-file migration. Starters targeting 1.1.0 also migrate
`owned/renewal.config.ts` with the required `subscriptionCare.retention`
mapping/default and the existing three-rung retry budget, as described in the
1.1.0 upgrade guide; this also applies when upgrading a 1.0.0 starter.

Align the current source starter and reader guidance with `MAX_CADENCE_DAYS`
(1..3660 whole days), removing the former starter database refusal above 90.
Applications continue to choose their offered cadences.

Migration: apply the matching platform package's complete native catalogue,
including `20261122190000_subscription_cadence_bound.sql`, before using longer
cadences. This change is unreleased. Checkout-command and saga-fallback replay
of stored cadence above 3660 can still quote before replay; that unreleased
development-data case remains a follow-up.

## @openlup/platform

Widen native subscription edit-quote CHECK, actor preview and command preview
cadence admission to 1..3660 whole days, matching `MAX_CADENCE_DAYS` in Core.
The two current function definitions change only their upper cadence bound;
headers, security, search paths, ownership, ACLs and replay behavior stay intact.
The validated CHECK uses the reviewed integer-range superset capability.

Migration: apply the complete selected native catalogue through
`20261122190000_subscription_cadence_bound.sql` before using longer cadences.
The forward replaces the validated CHECK and takes the usual table DDL lock;
plan installation around concurrent edits. No stored rows change. The managed
chain has no corresponding cap and receives no migration. Do not downgrade
history; unbind longer offers if rolling back application composition.
Checkout-command and saga-fallback replay above 3660 remains a follow-up for
unreleased development data. No release or activation is included.

## API changes

No API reports changed since the previous release.
