-- 036_crtc_ontario.sql
-- Add Ontario incorporation support to CRTC orders.
-- Adds province selection column and generalizes BC-specific field name.

BEGIN;

-- 1. Add incorporation_province column (default BC for existing orders)
ALTER TABLE canada_crtc_orders
    ADD COLUMN IF NOT EXISTS incorporation_province TEXT DEFAULT 'BC'
        CHECK (incorporation_province IN ('BC', 'ON'));

-- 2. Rename bc_incorporation_number → incorporation_number
ALTER TABLE canada_crtc_orders
    RENAME COLUMN bc_incorporation_number TO incorporation_number;

COMMIT;
