-- Seed data for the Contract Tracker schema, from section 14 of the blueprint. Load after contract-tracker.sql. -- Today is Thursday 2026-10-15 in America/Chicago. Calendar tokens are readable placeholders; the app generates long random ones. INSERT INTO settings (id, company_name, time_zone, notice_reminder_days, expiry_reminder_days) VALUES (1, 'Harbor Logistics', 'America/Chicago', '60,30,7', '90,30'); INSERT INTO people (id, name, email, role, active, calendar_token) VALUES ('person_grace', 'Grace Kim', 'grace@harborlogistics.example', 'admin', TRUE, 'cal-placeholder-grace'), ('person_omar', 'Omar Ali', 'omar@harborlogistics.example', 'member', TRUE, 'cal-placeholder-omar'), ('person_priya', 'Priya Nair', 'priya@harborlogistics.example', 'member', TRUE, 'cal-placeholder-priya'), ('person_ben', 'Ben Cole', 'ben@harborlogistics.example', 'member', TRUE, 'cal-placeholder-ben'); INSERT INTO counterparties (id, name, kind, contact_email) VALUES ('cp_acme', 'Acme Corp', 'customer', NULL), ('cp_zendesk', 'Zendesk', 'supplier', NULL), ('cp_bluebird', 'Bluebird Ltd', 'other', NULL), ('cp_fleetway', 'Fleetway Leasing', 'supplier', NULL), ('cp_sparkle', 'Sparkle Services', 'supplier', NULL), ('cp_lakeside', 'Lakeside Properties', 'landlord', NULL); INSERT INTO contracts (id, number, title, counterparty_id, type, owner_id, confidential, tags, annual_value_cents, start_date, end_date, auto_renew, renewal_term_months, notice_days, status, decision, decision_note, notice_sent_on, late_notice) VALUES ('contract_001', 'C-001', 'Acme master services agreement', 'cp_acme', 'Customer agreement', 'person_omar', FALSE, NULL, 12000000, '2026-02-01', '2027-01-31', TRUE, 12, 90, 'active', 'none', NULL, NULL, FALSE), ('contract_002', 'C-002', 'Zendesk subscription', 'cp_zendesk', 'Software', 'person_ben', FALSE, NULL, 228000, '2025-12-16', '2026-12-15', TRUE, 12, 30, 'active', 'none', NULL, NULL, FALSE), ('contract_003', 'C-003', 'Bluebird NDA', 'cp_bluebird', 'NDA', 'person_omar', FALSE, NULL, 0, '2025-03-01', '2027-03-01', FALSE, NULL, NULL, 'active', 'none', NULL, NULL, FALSE), ('contract_004', 'C-004', 'Van lease', 'cp_fleetway', 'Lease', 'person_priya', FALSE, NULL, 1440000, '2023-11-01', '2026-10-31', FALSE, NULL, NULL, 'active', 'none', NULL, NULL, FALSE), ('contract_005', 'C-005', 'Office cleaning', 'cp_sparkle', 'Services', 'person_priya', FALSE, NULL, 960000, '2025-01-01', NULL, FALSE, NULL, 30, 'active', 'none', NULL, NULL, FALSE), ('contract_006', 'C-006', 'Warehouse lease', 'cp_lakeside', 'Lease', 'person_grace', TRUE, NULL, 9600000, '2024-01-01', '2028-12-31', FALSE, NULL, NULL, 'active', 'none', NULL, NULL, FALSE); -- The reminders section 14 says were already sent, keyed by the date they were for. INSERT INTO reminders_sent (contract_id, kind, days_before, for_date, sent_on) VALUES ('contract_001', 'notice', 60, '2026-11-02', '2026-09-03'), ('contract_001', 'notice', 30, '2026-11-02', '2026-10-03'), ('contract_002', 'notice', 60, '2026-11-15', '2026-09-16'), ('contract_004', 'expiry', 90, '2026-10-31', '2026-08-02'), ('contract_004', 'expiry', 30, '2026-10-31', '2026-10-01'); -- A signed term is written when a contract is created, with the dates of its current term. INSERT INTO terms (id, contract_id, start_date, end_date, how) VALUES ('term_001_1', 'contract_001', '2026-02-01', '2027-01-31', 'signed'), ('term_002_1', 'contract_002', '2025-12-16', '2026-12-15', 'signed'), ('term_003_1', 'contract_003', '2025-03-01', '2027-03-01', 'signed'), ('term_004_1', 'contract_004', '2023-11-01', '2026-10-31', 'signed'), ('term_005_1', 'contract_005', '2025-01-01', NULL, 'signed'), ('term_006_1', 'contract_006', '2024-01-01', '2028-12-31', 'signed');