-- Seed data for the Employee Onboarding schema, from section 14 of the blueprint. Load after employee-onboarding.sql. -- Seed day: Tue 2026-10-13, the date the spec's examples assume. Team times (America/New_York) are stored in UTC. -- Managers are listed before their reports. INSERT INTO people (id, name, email, title, manager_id, is_people_team, active, start_date) VALUES ('person_dana', 'Dana Ruiz', 'dana.ruiz@fernway.com', 'People Operations Lead', NULL, TRUE, TRUE, NULL), ('person_ben', 'Ben Cho', 'ben.cho@fernway.com', 'IT Manager', NULL, FALSE, TRUE, NULL), ('person_sam', 'Sam Okafor', 'sam.okafor@fernway.com', 'Sales Manager', NULL, FALSE, TRUE, NULL), ('person_maya', 'Maya Chen', 'maya.chen@fernway.com', 'Design Lead', NULL, FALSE, TRUE, NULL), ('person_ana', 'Ana Lima', 'ana.lima@fernway.com', 'Account Executive', 'person_sam', FALSE, TRUE, NULL), ('person_jo', 'Jo Park', 'jo.park@fernway.com', 'Designer', 'person_maya', FALSE, TRUE, NULL), ('person_priya', 'Priya Nair', 'priya.nair@fernway.com', 'Account Executive', 'person_sam', FALSE, TRUE, '2026-10-26'), ('person_leo', 'Leo Grant', 'leo.grant@fernway.com', 'Product Designer', 'person_maya', FALSE, TRUE, '2026-10-05'), ('person_kai', 'Kai Brooks', 'kai.brooks@fernway.com', 'Support Specialist', 'person_dana', FALSE, TRUE, '2026-11-02'); INSERT INTO settings (id, company_name, time_zone, it_owner_id, people_owner_id, digest_hour) VALUES (1, 'Fernway', 'America/New_York', 'person_ben', 'person_dana', 8); INSERT INTO templates (id, name, kind, active) VALUES ('template_standard', 'Standard', 'base', TRUE), ('template_sales', 'Sales', 'add_on', TRUE), ('template_design', 'Design', 'add_on', TRUE); INSERT INTO template_tasks (id, template_id, title, description, owner_role, offset_days, is_check_in, position) VALUES ('ttask_standard_01', 'template_standard', 'Send welcome email and first-week schedule', NULL, 'manager', -10, FALSE, 1), ('ttask_standard_02', 'template_standard', 'Order laptop', NULL, 'it', -7, FALSE, 2), ('ttask_standard_03', 'template_standard', 'Create Google Workspace and Slack accounts', NULL, 'it', -5, FALSE, 3), ('ttask_standard_04', 'template_standard', 'Add to payroll and benefits', NULL, 'people', -5, FALSE, 4), ('ttask_standard_05', 'template_standard', 'Pick a buddy and introduce them', NULL, 'manager', -3, FALSE, 5), ('ttask_standard_06', 'template_standard', 'Prepare desk or ship equipment', NULL, 'it', -1, FALSE, 6), ('ttask_standard_07', 'template_standard', 'Welcome meeting and tour', NULL, 'manager', 0, FALSE, 7), ('ttask_standard_08', 'template_standard', 'Sign in and read the handbook', NULL, 'new_hire', 0, FALSE, 8), ('ttask_standard_09', 'template_standard', 'Coffee with your buddy', NULL, 'buddy', 0, FALSE, 9), ('ttask_standard_10', 'template_standard', 'Set 30-60-90 day goals', NULL, 'manager', 4, FALSE, 10), ('ttask_standard_11', 'template_standard', 'Complete security training', NULL, 'new_hire', 4, FALSE, 11), ('ttask_standard_12', 'template_standard', '30-day check-in', NULL, 'manager', 30, TRUE, 12), ('ttask_standard_13', 'template_standard', '60-day check-in', NULL, 'manager', 60, TRUE, 13), ('ttask_standard_14', 'template_standard', '90-day review', NULL, 'manager', 90, TRUE, 14), ('ttask_sales_01', 'template_sales', 'Shadow three sales calls', NULL, 'buddy', 2, FALSE, 1), ('ttask_sales_02', 'template_sales', 'CRM training', NULL, 'new_hire', 10, FALSE, 2), ('ttask_design_01', 'template_design', 'Design system walkthrough', NULL, 'buddy', 2, FALSE, 1); -- The spec gives no creation time; this file uses 09:00 team time 21 days before each start date, so every seeded event follows it. INSERT INTO onboardings (id, new_hire_id, manager_id, buddy_id, start_date, title, status, cancel_reason, created_by, created_at) VALUES ('onboarding_priya', 'person_priya', 'person_sam', 'person_ana', '2026-10-26', 'Account Executive', 'upcoming', NULL, 'person_dana', '2026-10-05 13:00:00'), ('onboarding_leo', 'person_leo', 'person_maya', 'person_jo', '2026-10-05', 'Product Designer', 'in_progress', NULL, 'person_dana', '2026-09-14 13:00:00'), ('onboarding_kai', 'person_kai', 'person_dana', 'person_jo', '2026-11-02', 'Support Specialist', 'upcoming', NULL, 'person_dana', '2026-10-12 13:00:00'); INSERT INTO onboarding_templates (onboarding_id, position, template_name) VALUES ('onboarding_priya', 1, 'Standard'), ('onboarding_priya', 2, 'Sales'), ('onboarding_leo', 1, 'Standard'), ('onboarding_leo', 2, 'Design'), ('onboarding_kai', 1, 'Standard'); -- Base template first, then add-ons in name order (section 7). Due dates follow R2. Done tasks were done by their owner at 16:00 team time on the due date, or on the day before the seed day when the due date is later. INSERT INTO tasks (id, onboarding_id, title, description, owner_role, owner_id, offset_days, due_date, is_check_in, position, status, done_at, done_by, skip_reason, check_in_note) VALUES ('task_priya_01', 'onboarding_priya', 'Send welcome email and first-week schedule', NULL, 'manager', 'person_sam', -10, '2026-10-16', FALSE, 1, 'done', '2026-10-12 20:00:00', 'person_sam', NULL, NULL), ('task_priya_02', 'onboarding_priya', 'Order laptop', NULL, 'it', 'person_ben', -7, '2026-10-19', FALSE, 2, 'open', NULL, NULL, NULL, NULL), ('task_priya_03', 'onboarding_priya', 'Create Google Workspace and Slack accounts', NULL, 'it', 'person_ben', -5, '2026-10-21', FALSE, 3, 'open', NULL, NULL, NULL, NULL), ('task_priya_04', 'onboarding_priya', 'Add to payroll and benefits', NULL, 'people', 'person_dana', -5, '2026-10-21', FALSE, 4, 'open', NULL, NULL, NULL, NULL), ('task_priya_05', 'onboarding_priya', 'Pick a buddy and introduce them', NULL, 'manager', 'person_sam', -3, '2026-10-23', FALSE, 5, 'open', NULL, NULL, NULL, NULL), ('task_priya_06', 'onboarding_priya', 'Prepare desk or ship equipment', NULL, 'it', 'person_ben', -1, '2026-10-23', FALSE, 6, 'open', NULL, NULL, NULL, NULL), ('task_priya_07', 'onboarding_priya', 'Welcome meeting and tour', NULL, 'manager', 'person_sam', 0, '2026-10-26', FALSE, 7, 'open', NULL, NULL, NULL, NULL), ('task_priya_08', 'onboarding_priya', 'Sign in and read the handbook', NULL, 'new_hire', 'person_priya', 0, '2026-10-26', FALSE, 8, 'open', NULL, NULL, NULL, NULL), ('task_priya_09', 'onboarding_priya', 'Coffee with your buddy', NULL, 'buddy', 'person_ana', 0, '2026-10-26', FALSE, 9, 'open', NULL, NULL, NULL, NULL), ('task_priya_10', 'onboarding_priya', 'Set 30-60-90 day goals', NULL, 'manager', 'person_sam', 4, '2026-10-30', FALSE, 10, 'open', NULL, NULL, NULL, NULL), ('task_priya_11', 'onboarding_priya', 'Complete security training', NULL, 'new_hire', 'person_priya', 4, '2026-10-30', FALSE, 11, 'open', NULL, NULL, NULL, NULL), ('task_priya_12', 'onboarding_priya', '30-day check-in', NULL, 'manager', 'person_sam', 30, '2026-11-25', TRUE, 12, 'open', NULL, NULL, NULL, NULL), ('task_priya_13', 'onboarding_priya', '60-day check-in', NULL, 'manager', 'person_sam', 60, '2026-12-25', TRUE, 13, 'open', NULL, NULL, NULL, NULL), ('task_priya_14', 'onboarding_priya', '90-day review', NULL, 'manager', 'person_sam', 90, '2027-01-22', TRUE, 14, 'open', NULL, NULL, NULL, NULL), ('task_priya_15', 'onboarding_priya', 'Shadow three sales calls', NULL, 'buddy', 'person_ana', 2, '2026-10-28', FALSE, 15, 'open', NULL, NULL, NULL, NULL), ('task_priya_16', 'onboarding_priya', 'CRM training', NULL, 'new_hire', 'person_priya', 10, '2026-11-05', FALSE, 16, 'open', NULL, NULL, NULL, NULL), ('task_leo_01', 'onboarding_leo', 'Send welcome email and first-week schedule', NULL, 'manager', 'person_maya', -10, '2026-09-25', FALSE, 1, 'done', '2026-09-25 20:00:00', 'person_maya', NULL, NULL), ('task_leo_02', 'onboarding_leo', 'Order laptop', NULL, 'it', 'person_ben', -7, '2026-09-28', FALSE, 2, 'done', '2026-09-28 20:00:00', 'person_ben', NULL, NULL), ('task_leo_03', 'onboarding_leo', 'Create Google Workspace and Slack accounts', NULL, 'it', 'person_ben', -5, '2026-09-30', FALSE, 3, 'done', '2026-09-30 20:00:00', 'person_ben', NULL, NULL), ('task_leo_04', 'onboarding_leo', 'Add to payroll and benefits', NULL, 'people', 'person_dana', -5, '2026-09-30', FALSE, 4, 'done', '2026-09-30 20:00:00', 'person_dana', NULL, NULL), ('task_leo_05', 'onboarding_leo', 'Pick a buddy and introduce them', NULL, 'manager', 'person_maya', -3, '2026-10-02', FALSE, 5, 'done', '2026-10-02 20:00:00', 'person_maya', NULL, NULL), ('task_leo_06', 'onboarding_leo', 'Prepare desk or ship equipment', NULL, 'it', 'person_ben', -1, '2026-10-02', FALSE, 6, 'done', '2026-10-02 20:00:00', 'person_ben', NULL, NULL), ('task_leo_07', 'onboarding_leo', 'Welcome meeting and tour', NULL, 'manager', 'person_maya', 0, '2026-10-05', FALSE, 7, 'done', '2026-10-05 20:00:00', 'person_maya', NULL, NULL), ('task_leo_08', 'onboarding_leo', 'Sign in and read the handbook', NULL, 'new_hire', 'person_leo', 0, '2026-10-05', FALSE, 8, 'done', '2026-10-05 20:00:00', 'person_leo', NULL, NULL), ('task_leo_09', 'onboarding_leo', 'Coffee with your buddy', NULL, 'buddy', 'person_jo', 0, '2026-10-05', FALSE, 9, 'done', '2026-10-05 20:00:00', 'person_jo', NULL, NULL), ('task_leo_10', 'onboarding_leo', 'Set 30-60-90 day goals', NULL, 'manager', 'person_maya', 4, '2026-10-09', FALSE, 10, 'open', NULL, NULL, NULL, NULL), ('task_leo_11', 'onboarding_leo', 'Complete security training', NULL, 'new_hire', 'person_leo', 4, '2026-10-09', FALSE, 11, 'open', NULL, NULL, NULL, NULL), ('task_leo_12', 'onboarding_leo', '30-day check-in', NULL, 'manager', 'person_maya', 30, '2026-11-04', TRUE, 12, 'open', NULL, NULL, NULL, NULL), ('task_leo_13', 'onboarding_leo', '60-day check-in', NULL, 'manager', 'person_maya', 60, '2026-12-04', TRUE, 13, 'open', NULL, NULL, NULL, NULL), ('task_leo_14', 'onboarding_leo', '90-day review', NULL, 'manager', 'person_maya', 90, '2027-01-01', TRUE, 14, 'open', NULL, NULL, NULL, NULL), ('task_leo_15', 'onboarding_leo', 'Design system walkthrough', NULL, 'buddy', 'person_jo', 2, '2026-10-07', FALSE, 15, 'done', '2026-10-07 20:00:00', 'person_jo', NULL, NULL), ('task_kai_01', 'onboarding_kai', 'Send welcome email and first-week schedule', NULL, 'manager', 'person_dana', -10, '2026-10-23', FALSE, 1, 'open', NULL, NULL, NULL, NULL), ('task_kai_02', 'onboarding_kai', 'Order laptop', NULL, 'it', 'person_ben', -7, '2026-10-26', FALSE, 2, 'open', NULL, NULL, NULL, NULL), ('task_kai_03', 'onboarding_kai', 'Create Google Workspace and Slack accounts', NULL, 'it', 'person_ben', -5, '2026-10-28', FALSE, 3, 'open', NULL, NULL, NULL, NULL), ('task_kai_04', 'onboarding_kai', 'Add to payroll and benefits', NULL, 'people', 'person_dana', -5, '2026-10-28', FALSE, 4, 'open', NULL, NULL, NULL, NULL), ('task_kai_05', 'onboarding_kai', 'Pick a buddy and introduce them', NULL, 'manager', 'person_dana', -3, '2026-10-30', FALSE, 5, 'open', NULL, NULL, NULL, NULL), ('task_kai_06', 'onboarding_kai', 'Prepare desk or ship equipment', NULL, 'it', 'person_ben', -1, '2026-10-30', FALSE, 6, 'open', NULL, NULL, NULL, NULL), ('task_kai_07', 'onboarding_kai', 'Welcome meeting and tour', NULL, 'manager', 'person_dana', 0, '2026-11-02', FALSE, 7, 'open', NULL, NULL, NULL, NULL), ('task_kai_08', 'onboarding_kai', 'Sign in and read the handbook', NULL, 'new_hire', 'person_kai', 0, '2026-11-02', FALSE, 8, 'open', NULL, NULL, NULL, NULL), ('task_kai_09', 'onboarding_kai', 'Coffee with your buddy', NULL, 'buddy', 'person_jo', 0, '2026-11-02', FALSE, 9, 'open', NULL, NULL, NULL, NULL), ('task_kai_10', 'onboarding_kai', 'Set 30-60-90 day goals', NULL, 'manager', 'person_dana', 4, '2026-11-06', FALSE, 10, 'open', NULL, NULL, NULL, NULL), ('task_kai_11', 'onboarding_kai', 'Complete security training', NULL, 'new_hire', 'person_kai', 4, '2026-11-06', FALSE, 11, 'open', NULL, NULL, NULL, NULL), ('task_kai_12', 'onboarding_kai', '30-day check-in', NULL, 'manager', 'person_dana', 30, '2026-12-02', TRUE, 12, 'open', NULL, NULL, NULL, NULL), ('task_kai_13', 'onboarding_kai', '60-day check-in', NULL, 'manager', 'person_dana', 60, '2027-01-01', TRUE, 13, 'open', NULL, NULL, NULL, NULL), ('task_kai_14', 'onboarding_kai', '90-day review', NULL, 'manager', 'person_dana', 90, '2027-01-29', TRUE, 14, 'open', NULL, NULL, NULL, NULL); -- A created event per onboarding and a task_done event per done task. INSERT INTO events (id, onboarding_id, actor_id, type, data, created_at) VALUES ('event_001', 'onboarding_leo', 'person_dana', 'created', NULL, '2026-09-14 13:00:00'), ('event_002', 'onboarding_leo', 'person_maya', 'task_done', NULL, '2026-09-25 20:00:00'), ('event_003', 'onboarding_leo', 'person_ben', 'task_done', NULL, '2026-09-28 20:00:00'), ('event_004', 'onboarding_leo', 'person_ben', 'task_done', NULL, '2026-09-30 20:00:00'), ('event_005', 'onboarding_leo', 'person_dana', 'task_done', NULL, '2026-09-30 20:00:00'), ('event_006', 'onboarding_leo', 'person_ben', 'task_done', NULL, '2026-10-02 20:00:00'), ('event_007', 'onboarding_leo', 'person_maya', 'task_done', NULL, '2026-10-02 20:00:00'), ('event_008', 'onboarding_priya', 'person_dana', 'created', NULL, '2026-10-05 13:00:00'), ('event_009', 'onboarding_leo', 'person_jo', 'task_done', NULL, '2026-10-05 20:00:00'), ('event_010', 'onboarding_leo', 'person_leo', 'task_done', NULL, '2026-10-05 20:00:00'), ('event_011', 'onboarding_leo', 'person_maya', 'task_done', NULL, '2026-10-05 20:00:00'), ('event_012', 'onboarding_leo', 'person_jo', 'task_done', NULL, '2026-10-07 20:00:00'), ('event_013', 'onboarding_kai', 'person_dana', 'created', NULL, '2026-10-12 13:00:00'), ('event_014', 'onboarding_priya', 'person_sam', 'task_done', NULL, '2026-10-12 20:00:00'); -- The outbox and digest runs start empty.