Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
645 B
PL/PgSQL
17 lines
645 B
PL/PgSQL
-- 024_crtc_trade_name.sql
|
|
-- Add trade name support to canada_crtc_orders.
|
|
|
|
BEGIN;
|
|
|
|
-- Add trade name columns
|
|
ALTER TABLE canada_crtc_orders
|
|
ADD COLUMN IF NOT EXISTS trade_name TEXT,
|
|
ADD COLUMN IF NOT EXISTS add_trade_name BOOLEAN DEFAULT FALSE;
|
|
|
|
-- Expand company_type CHECK to include numbered_tradename
|
|
-- Drop old constraint and recreate (PG doesn't support ALTER CONSTRAINT)
|
|
ALTER TABLE canada_crtc_orders DROP CONSTRAINT IF EXISTS canada_crtc_orders_company_type_check;
|
|
ALTER TABLE canada_crtc_orders ADD CONSTRAINT canada_crtc_orders_company_type_check
|
|
CHECK (company_type IN ('numbered', 'numbered_tradename', 'named'));
|
|
|
|
COMMIT;
|