-- Seed data for the Performance Reviews schema, from section 14 of the blueprint. Load after performance-reviews.sql. -- Today is Thursday, October 15, 2026, company time America/Chicago (CDT, UTC-5). Times the spec gives in company time are converted to UTC; dates without a time use 12:00 UTC. -- The H1 2026 cycle, the answers, the outbox and the events are left out; the JSON seedNote says why. INSERT INTO settings (key, value) VALUES ('company_name', 'Pinecrest Studio'), ('time_zone', 'America/Chicago'); -- start_date is a placeholder (2026-01-01) for everyone except Nate: the spec says only that they started before Sep 30, 2026. INSERT INTO people (id, name, email, title, team, role, manager_id, start_date, active, pronouns) VALUES ('p_dan', 'Dan Price', 'dan@pinecrest.example', 'CEO', 'Leadership', 'member', NULL, '2026-01-01', TRUE, 'he'), ('p_hannah', 'Hannah Cole', 'hannah@pinecrest.example', 'Head of People', 'People', 'admin', 'p_dan', '2026-01-01', TRUE, 'she'), ('p_marcus', 'Marcus Webb', 'marcus@pinecrest.example', 'Engineering lead', 'Engineering', 'member', 'p_dan', '2026-01-01', TRUE, 'he'), ('p_sofia', 'Sofia Ruiz', 'sofia@pinecrest.example', 'Design lead', 'Design', 'member', 'p_dan', '2026-01-01', TRUE, 'she'), ('p_ivy', 'Ivy Tan', 'ivy@pinecrest.example', 'Engineer', 'Engineering', 'member', 'p_marcus', '2026-01-01', TRUE, 'she'), ('p_leo', 'Leo Grant', 'leo@pinecrest.example', 'Engineer', 'Engineering', 'member', 'p_marcus', '2026-01-01', TRUE, 'he'), ('p_kai', 'Kai Moore', 'kai@pinecrest.example', 'Designer', 'Design', 'member', 'p_sofia', '2026-01-01', TRUE, 'he'), ('p_ella', 'Ella Ford', 'ella@pinecrest.example', 'Designer', 'Design', 'member', 'p_sofia', '2026-01-01', TRUE, 'she'), ('p_nate', 'Nate Bell', 'nate@pinecrest.example', 'Designer', 'Design', 'member', 'p_sofia', '2026-10-01', TRUE, 'he'); INSERT INTO templates (id, name) VALUES ('t_half_year', 'Half-year review'); -- Question ids other than overall are not in the spec; these are short names for each question. INSERT INTO template_questions (template_id, id, position, text, kind, audience, required) VALUES ('t_half_year', 'went_well', 1, 'What went well this half?', 'text', 'both', TRUE), ('t_half_year', 'do_better', 2, 'What would you like to do better next half?', 'text', 'both', TRUE), ('t_half_year', 'quality', 3, 'Quality of work', 'rating', 'both', TRUE), ('t_half_year', 'collaboration', 4, 'Collaboration', 'rating', 'both', TRUE), ('t_half_year', 'ownership', 5, 'Ownership', 'rating', 'both', TRUE), ('t_half_year', 'overall', 6, 'Overall rating', 'rating', 'manager', TRUE), ('t_half_year', 'keep_doing', 7, 'What should {name} keep doing?', 'text', 'peer', TRUE), ('t_half_year', 'differently', 8, 'What could {name} do differently?', 'text', 'peer', TRUE); -- Launched Mon Oct 12 at 09:00 company time (14:00 UTC). INSERT INTO cycles (id, name, template_id, status, start_date_cutoff, self_due, peer_due, manager_due, release_on, share_peer_feedback, peer_min_for_sharing, launched_at, closed_at) VALUES ('cy_h2_2026', 'H2 2026', 't_half_year', 'active', '2026-09-30', '2026-10-22', '2026-10-29', '2026-11-05', '2026-11-12', TRUE, 2, '2026-10-12 14:00:00', NULL); -- Seven reviews: everyone except Dan (no manager) and Nate (started after the cutoff). Submission dates have no time in the spec. INSERT INTO reviews (id, cycle_id, employee_id, manager_id, self_status, manager_status, self_submitted_at, manager_submitted_at, overall_rating, calibrated_rating, calibration_reason, released_at, acknowledged_at, acknowledgement_comment) VALUES ('rv_ivy', 'cy_h2_2026', 'p_ivy', 'p_marcus', 'submitted', 'not_started', '2026-10-13 12:00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_kai', 'cy_h2_2026', 'p_kai', 'p_sofia', 'submitted', 'not_started', '2026-10-14 12:00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_sofia', 'cy_h2_2026', 'p_sofia', 'p_dan', 'submitted', 'not_started', '2026-10-14 12:00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_leo', 'cy_h2_2026', 'p_leo', 'p_marcus', 'draft', 'not_started', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_ella', 'cy_h2_2026', 'p_ella', 'p_sofia', 'not_started', 'not_started', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_marcus', 'cy_h2_2026', 'p_marcus', 'p_dan', 'not_started', 'not_started', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('rv_hannah', 'cy_h2_2026', 'p_hannah', 'p_dan', 'not_started', 'not_started', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO peer_requests (id, review_id, peer_id, status, decided_by, reason, submitted_at) VALUES ('pr_ivy_kai', 'rv_ivy', 'p_kai', 'approved', 'p_marcus', NULL, NULL), ('pr_ivy_leo', 'rv_ivy', 'p_leo', 'approved', 'p_marcus', NULL, NULL), ('pr_kai_ivy', 'rv_kai', 'p_ivy', 'proposed', NULL, NULL, NULL), ('pr_kai_ella', 'rv_kai', 'p_ella', 'proposed', NULL, NULL, NULL);