/** * Shipping provider refactor — Phase 1 (additive only). * * Creates the new platform schema (shipping_zone_provider, * shipping_zone_country) and the Core provider's internal tables * (core_shipping_method, core_shipping_method_rate). Adds shipping_method_data * JSONB columns to cart and order. Adds a country column to * shipping_zone_province so province codes disambiguate when a zone covers * multiple countries. Replaces the buggy global-unique-on-province constraint * with a composite (zone_id, country, province) unique. * * Backfills: * - shipping_zone_country from legacy shipping_zone.country * - shipping_zone_province.country from each row's parent zone * - core_shipping_method from shipping_method (uuid preserved for stable IDs) * - core_shipping_method_rate from shipping_zone_method (calculate_api dropped) * - order.shipping_method_data from legacy shipping_method/shipping_method_name * * Attaches the built-in Core provider to every existing zone via a soft * `provider_code = 'core'` reference. There is NO `shipping_provider` table — * the in-memory registry (`services/shipping/registry.ts`, fed by every * provider extension's `registerShippingProvider(...)` call at bootstrap) is * the single source of truth. Earlier drafts of this phase did create a * `shipping_provider` table to mirror the registry, but it was hoisted out * before release because (a) "installed = enabled" makes the global toggle * redundant and (b) no current consumer needed the global config form. * Per-zone config still lives in `shipping_zone_provider.config`. Secrets * live in `process.env`. Orphan attachments to uninstalled providers are * filtered at checkout via `getShippingProvider(code)` returning undefined. * * NO legacy drops in this migration. Old tables and columns coexist with the * new ones until phase 8 of the refactor. * * See wiki/shipping-provider-design.md for the design and * wiki/shipping-provider-implementation-plan.md for the phasing. */ declare const _default: (connection: any) => Promise; export default _default;