-- Seed data for the Client Onboarding Tracker schema, from section 15 of the blueprint. Load after client-onboarding-tracker.sql. -- Loaded as on 2026-10-13, the date the spec's worked examples use. Team times (09:00, 16:00, 17:00 America/New_York) are stored in UTC. INSERT INTO settings (id, company_name, time_zone, last_digest_on) VALUES (1, 'Copperline', 'America/New_York', NULL); INSERT INTO people (id, name, title, email, is_admin, active) VALUES ('person_dana', 'Dana Ruiz', 'Head of Ops', 'dana@copperline.example', TRUE, TRUE), ('person_ana', 'Ana Lima', 'Finance lead', 'ana@copperline.example', TRUE, TRUE), ('person_maya', 'Maya Chen', 'Customer success lead', 'maya@copperline.example', FALSE, TRUE), ('person_sam', 'Sam Okafor', 'Engineering lead', 'sam@copperline.example', FALSE, TRUE), ('person_ben', 'Ben Cho', 'IT', 'ben@copperline.example', FALSE, TRUE), ('person_jo', 'Jo Park', 'Account manager', 'jo@copperline.example', FALSE, TRUE), ('person_lee', 'Lee Park', 'Engineer', 'lee@copperline.example', FALSE, TRUE); -- The spec gives no template times; they are set to the first project's creation time so both exist before any project. INSERT INTO templates (id, name, description, active, created_at, updated_at) VALUES ('template_standard', 'Implementation · standard', NULL, TRUE, '2026-09-29 13:00:00', '2026-09-29 13:00:00'), ('template_enterprise', 'Enterprise · draft', NULL, TRUE, '2026-09-29 13:00:00', '2026-09-29 13:00:00'); INSERT INTO template_tasks (id, template_id, stage, position, title, description, default_owner_id, offset_days, visible_to_client) VALUES ('ttask_standard_1', 'template_standard', 'kickoff', 1, 'Confirm success criteria', NULL, 'person_dana', 1, TRUE), ('ttask_standard_2', 'template_standard', 'kickoff', 2, 'Run kickoff workshop', NULL, 'person_maya', 2, TRUE), ('ttask_standard_3', 'template_standard', 'setup', 1, 'Import client data', NULL, 'person_sam', 5, TRUE), ('ttask_standard_4', 'template_standard', 'setup', 2, 'Verify access and permissions', NULL, 'person_ben', 6, FALSE), ('ttask_standard_5', 'template_standard', 'training', 1, 'Train client champions', NULL, 'person_maya', 9, TRUE), ('ttask_standard_6', 'template_standard', 'training', 2, 'Approve go-live checklist', NULL, 'person_dana', 10, TRUE), ('ttask_enterprise_1', 'template_enterprise', 'kickoff', 1, 'Complete security questionnaire', NULL, 'person_ben', 3, TRUE); -- Created by Jo at 09:00 team time on the start date; Dana owned each at Kickoff. updated_at is the last handoff, or creation. INSERT INTO projects (id, client_name, name, template_id, template_name, owner_id, created_by_id, start_date, stage, status, stage_started_at, on_hold_since, hold_reason, cancelled_at, cancel_reason, live_at, created_at, updated_at) VALUES ('project_northwind', 'Northwind', 'Customer portal', 'template_standard', 'Implementation · standard', 'person_dana', 'person_jo', '2026-10-10', 'kickoff', 'active', '2026-10-10 13:00:00', NULL, NULL, NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('project_bluebird', 'Bluebird', 'Analytics rollout', 'template_standard', 'Implementation · standard', 'person_sam', 'person_jo', '2026-10-05', 'setup', 'active', '2026-10-07 21:00:00', NULL, NULL, NULL, NULL, NULL, '2026-10-05 13:00:00', '2026-10-07 21:00:00'), ('project_harbor', 'Harbor Studio', 'Team workspace', 'template_standard', 'Implementation · standard', 'person_maya', 'person_jo', '2026-10-04', 'training', 'active', '2026-10-10 21:00:00', NULL, NULL, NULL, NULL, NULL, '2026-10-04 13:00:00', '2026-10-10 21:00:00'), ('project_kestrel', 'Kestrel', 'Support launch', 'template_standard', 'Implementation · standard', 'person_dana', 'person_jo', '2026-09-29', 'live', 'active', '2026-10-09 21:00:00', NULL, NULL, NULL, NULL, '2026-10-09 21:00:00', '2026-09-29 13:00:00', '2026-10-09 21:00:00'); -- Each project has the template's six tasks (section 6). Done tasks were completed by their owner at 16:00 team time on the due date. INSERT INTO tasks (id, project_id, template_task_id, stage, position, title, description, visible_to_client, owner_id, due_date, status, skip_reason, closed_at, closed_by_id, created_at, updated_at) VALUES ('task_northwind_1', 'project_northwind', 'ttask_standard_1', 'kickoff', 1, 'Confirm success criteria', NULL, TRUE, 'person_dana', '2026-10-11', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_northwind_2', 'project_northwind', 'ttask_standard_2', 'kickoff', 2, 'Run kickoff workshop', NULL, TRUE, 'person_maya', '2026-10-12', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_northwind_3', 'project_northwind', 'ttask_standard_3', 'setup', 1, 'Import client data', NULL, TRUE, 'person_sam', '2026-10-15', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_northwind_4', 'project_northwind', 'ttask_standard_4', 'setup', 2, 'Verify access and permissions', NULL, FALSE, 'person_ben', '2026-10-16', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_northwind_5', 'project_northwind', 'ttask_standard_5', 'training', 1, 'Train client champions', NULL, TRUE, 'person_maya', '2026-10-19', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_northwind_6', 'project_northwind', 'ttask_standard_6', 'training', 2, 'Approve go-live checklist', NULL, TRUE, 'person_dana', '2026-10-20', 'open', NULL, NULL, NULL, '2026-10-10 13:00:00', '2026-10-10 13:00:00'), ('task_bluebird_1', 'project_bluebird', 'ttask_standard_1', 'kickoff', 1, 'Confirm success criteria', NULL, TRUE, 'person_dana', '2026-10-06', 'done', NULL, '2026-10-06 20:00:00', 'person_dana', '2026-10-05 13:00:00', '2026-10-06 20:00:00'), ('task_bluebird_2', 'project_bluebird', 'ttask_standard_2', 'kickoff', 2, 'Run kickoff workshop', NULL, TRUE, 'person_maya', '2026-10-07', 'done', NULL, '2026-10-07 20:00:00', 'person_maya', '2026-10-05 13:00:00', '2026-10-07 20:00:00'), ('task_bluebird_3', 'project_bluebird', 'ttask_standard_3', 'setup', 1, 'Import client data', NULL, TRUE, 'person_sam', '2026-10-10', 'open', NULL, NULL, NULL, '2026-10-05 13:00:00', '2026-10-05 13:00:00'), ('task_bluebird_4', 'project_bluebird', 'ttask_standard_4', 'setup', 2, 'Verify access and permissions', NULL, FALSE, 'person_ben', '2026-10-11', 'open', NULL, NULL, NULL, '2026-10-05 13:00:00', '2026-10-05 13:00:00'), ('task_bluebird_5', 'project_bluebird', 'ttask_standard_5', 'training', 1, 'Train client champions', NULL, TRUE, 'person_maya', '2026-10-14', 'open', NULL, NULL, NULL, '2026-10-05 13:00:00', '2026-10-05 13:00:00'), ('task_bluebird_6', 'project_bluebird', 'ttask_standard_6', 'training', 2, 'Approve go-live checklist', NULL, TRUE, 'person_dana', '2026-10-15', 'open', NULL, NULL, NULL, '2026-10-05 13:00:00', '2026-10-05 13:00:00'), ('task_harbor_1', 'project_harbor', 'ttask_standard_1', 'kickoff', 1, 'Confirm success criteria', NULL, TRUE, 'person_dana', '2026-10-05', 'done', NULL, '2026-10-05 20:00:00', 'person_dana', '2026-10-04 13:00:00', '2026-10-05 20:00:00'), ('task_harbor_2', 'project_harbor', 'ttask_standard_2', 'kickoff', 2, 'Run kickoff workshop', NULL, TRUE, 'person_maya', '2026-10-06', 'done', NULL, '2026-10-06 20:00:00', 'person_maya', '2026-10-04 13:00:00', '2026-10-06 20:00:00'), ('task_harbor_3', 'project_harbor', 'ttask_standard_3', 'setup', 1, 'Import client data', NULL, TRUE, 'person_sam', '2026-10-09', 'done', NULL, '2026-10-09 20:00:00', 'person_sam', '2026-10-04 13:00:00', '2026-10-09 20:00:00'), ('task_harbor_4', 'project_harbor', 'ttask_standard_4', 'setup', 2, 'Verify access and permissions', NULL, FALSE, 'person_ben', '2026-10-10', 'done', NULL, '2026-10-10 20:00:00', 'person_ben', '2026-10-04 13:00:00', '2026-10-10 20:00:00'), ('task_harbor_5', 'project_harbor', 'ttask_standard_5', 'training', 1, 'Train client champions', NULL, TRUE, 'person_maya', '2026-10-13', 'open', NULL, NULL, NULL, '2026-10-04 13:00:00', '2026-10-04 13:00:00'), ('task_harbor_6', 'project_harbor', 'ttask_standard_6', 'training', 2, 'Approve go-live checklist', NULL, TRUE, 'person_dana', '2026-10-14', 'open', NULL, NULL, NULL, '2026-10-04 13:00:00', '2026-10-04 13:00:00'), ('task_kestrel_1', 'project_kestrel', 'ttask_standard_1', 'kickoff', 1, 'Confirm success criteria', NULL, TRUE, 'person_dana', '2026-09-30', 'done', NULL, '2026-09-30 20:00:00', 'person_dana', '2026-09-29 13:00:00', '2026-09-30 20:00:00'), ('task_kestrel_2', 'project_kestrel', 'ttask_standard_2', 'kickoff', 2, 'Run kickoff workshop', NULL, TRUE, 'person_maya', '2026-10-01', 'done', NULL, '2026-10-01 20:00:00', 'person_maya', '2026-09-29 13:00:00', '2026-10-01 20:00:00'), ('task_kestrel_3', 'project_kestrel', 'ttask_standard_3', 'setup', 1, 'Import client data', NULL, TRUE, 'person_sam', '2026-10-04', 'done', NULL, '2026-10-04 20:00:00', 'person_sam', '2026-09-29 13:00:00', '2026-10-04 20:00:00'), ('task_kestrel_4', 'project_kestrel', 'ttask_standard_4', 'setup', 2, 'Verify access and permissions', NULL, FALSE, 'person_ben', '2026-10-05', 'done', NULL, '2026-10-05 20:00:00', 'person_ben', '2026-09-29 13:00:00', '2026-10-05 20:00:00'), ('task_kestrel_5', 'project_kestrel', 'ttask_standard_5', 'training', 1, 'Train client champions', NULL, TRUE, 'person_maya', '2026-10-08', 'done', NULL, '2026-10-08 20:00:00', 'person_maya', '2026-09-29 13:00:00', '2026-10-08 20:00:00'), ('task_kestrel_6', 'project_kestrel', 'ttask_standard_6', 'training', 2, 'Approve go-live checklist', NULL, TRUE, 'person_dana', '2026-10-09', 'done', NULL, '2026-10-09 20:00:00', 'person_dana', '2026-09-29 13:00:00', '2026-10-09 20:00:00'); -- Each at 17:00 team time. INSERT INTO handoffs (id, project_id, from_stage, to_stage, from_owner_id, to_owner_id, note, by_id, created_at) VALUES ('handoff_kestrel_setup', 'project_kestrel', 'kickoff', 'setup', 'person_dana', 'person_sam', NULL, 'person_dana', '2026-10-01 21:00:00'), ('handoff_kestrel_training', 'project_kestrel', 'setup', 'training', 'person_sam', 'person_maya', NULL, 'person_sam', '2026-10-05 21:00:00'), ('handoff_harbor_setup', 'project_harbor', 'kickoff', 'setup', 'person_dana', 'person_sam', NULL, 'person_dana', '2026-10-06 21:00:00'), ('handoff_bluebird_setup', 'project_bluebird', 'kickoff', 'setup', 'person_dana', 'person_sam', NULL, 'person_dana', '2026-10-07 21:00:00'), ('handoff_kestrel_live', 'project_kestrel', 'training', 'live', 'person_maya', 'person_dana', NULL, 'person_maya', '2026-10-09 21:00:00'), ('handoff_harbor_training', 'project_harbor', 'setup', 'training', 'person_sam', 'person_maya', NULL, 'person_sam', '2026-10-10 21:00:00'); -- project_created, task_completed and handed_off events for the history above, in time order. Sam's comment is left out: the spec gives its day but no time. INSERT INTO events (id, project_id, task_id, actor_id, created_at, type, comment, data) VALUES ('event_001', 'project_kestrel', NULL, 'person_jo', '2026-09-29 13:00:00', 'project_created', NULL, NULL), ('event_002', 'project_kestrel', 'task_kestrel_1', 'person_dana', '2026-09-30 20:00:00', 'task_completed', NULL, NULL), ('event_003', 'project_kestrel', 'task_kestrel_2', 'person_maya', '2026-10-01 20:00:00', 'task_completed', NULL, NULL), ('event_004', 'project_kestrel', NULL, 'person_dana', '2026-10-01 21:00:00', 'handed_off', NULL, NULL), ('event_005', 'project_harbor', NULL, 'person_jo', '2026-10-04 13:00:00', 'project_created', NULL, NULL), ('event_006', 'project_kestrel', 'task_kestrel_3', 'person_sam', '2026-10-04 20:00:00', 'task_completed', NULL, NULL), ('event_007', 'project_bluebird', NULL, 'person_jo', '2026-10-05 13:00:00', 'project_created', NULL, NULL), ('event_008', 'project_harbor', 'task_harbor_1', 'person_dana', '2026-10-05 20:00:00', 'task_completed', NULL, NULL), ('event_009', 'project_kestrel', 'task_kestrel_4', 'person_ben', '2026-10-05 20:00:00', 'task_completed', NULL, NULL), ('event_010', 'project_kestrel', NULL, 'person_sam', '2026-10-05 21:00:00', 'handed_off', NULL, NULL), ('event_011', 'project_bluebird', 'task_bluebird_1', 'person_dana', '2026-10-06 20:00:00', 'task_completed', NULL, NULL), ('event_012', 'project_harbor', 'task_harbor_2', 'person_maya', '2026-10-06 20:00:00', 'task_completed', NULL, NULL), ('event_013', 'project_harbor', NULL, 'person_dana', '2026-10-06 21:00:00', 'handed_off', NULL, NULL), ('event_014', 'project_bluebird', 'task_bluebird_2', 'person_maya', '2026-10-07 20:00:00', 'task_completed', NULL, NULL), ('event_015', 'project_bluebird', NULL, 'person_dana', '2026-10-07 21:00:00', 'handed_off', NULL, NULL), ('event_016', 'project_kestrel', 'task_kestrel_5', 'person_maya', '2026-10-08 20:00:00', 'task_completed', NULL, NULL), ('event_017', 'project_harbor', 'task_harbor_3', 'person_sam', '2026-10-09 20:00:00', 'task_completed', NULL, NULL), ('event_018', 'project_kestrel', 'task_kestrel_6', 'person_dana', '2026-10-09 20:00:00', 'task_completed', NULL, NULL), ('event_019', 'project_kestrel', NULL, 'person_maya', '2026-10-09 21:00:00', 'handed_off', NULL, NULL), ('event_020', 'project_northwind', NULL, 'person_jo', '2026-10-10 13:00:00', 'project_created', NULL, NULL), ('event_021', 'project_harbor', 'task_harbor_4', 'person_ben', '2026-10-10 20:00:00', 'task_completed', NULL, NULL), ('event_022', 'project_harbor', NULL, 'person_sam', '2026-10-10 21:00:00', 'handed_off', NULL, NULL); -- No client links and no notifications are seeded (section 15).