-- Seed data for the Customer Feedback Inbox schema, from section 14 of the blueprint. Load after feedback-inbox.sql. -- T (the day the seed is loaded) is fixed to Wed 14 Oct 2026. America/New_York is UTC-4 on every seed date. -- Received dates are midnight team time (04:00 UTC), as R4 defines for a past date. Other actions use 10:00 team time (14:00 UTC). INSERT INTO people (id, name, email, is_admin, active) VALUES ('person-dana', 'Dana Ruiz', 'dana@northwind.example', TRUE, TRUE), ('person-maya', 'Maya Chen', 'maya@northwind.example', FALSE, TRUE), ('person-sam', 'Sam Okafor', 'sam@northwind.example', FALSE, TRUE), ('person-jo', 'Jo Park', 'jo@northwind.example', FALSE, TRUE), ('person-ben', 'Ben Cho', 'ben@northwind.example', FALSE, TRUE); INSERT INTO settings (id, company_name, time_zone, follow_up_template) VALUES (1, 'Northwind', 'America/New_York', 'Hi {contact_first_name}, you asked us about {theme_name}. It''s now live. Thanks for telling us, it helped us decide. The {company_name} team'); INSERT INTO customers (id, name, mrr_cents, archived) VALUES ('customer-acme', 'Acme Corp', 240000, FALSE), ('customer-ridgeway', 'Ridgeway', 89000, FALSE), ('customer-olsen', 'Olsen & Co', 14900, FALSE), ('customer-harbor', 'Harbor Studio', 49000, FALSE); INSERT INTO customer_domains (domain, customer_id) VALUES ('acme.example', 'customer-acme'), ('ridgeway.example', 'customer-ridgeway'), ('olsen.example', 'customer-olsen'), ('harbor.example', 'customer-harbor'); -- Each theme's created_at is the day its first piece of feedback was received; the spec gives creators but no creation dates. INSERT INTO themes (id, name, description, created_by, created_at, promoted_at, owner_id, status) VALUES ('theme-sso', 'Single sign-on', NULL, 'person-jo', '2026-10-05 14:00:00', '2026-10-11 14:00:00', 'person-sam', 'planned'), ('theme-csv', 'CSV export', NULL, 'person-maya', '2026-09-14 14:00:00', '2026-09-16 14:00:00', 'person-maya', 'shipped'), ('theme-slack', 'Slack alerts', NULL, 'person-sam', '2026-10-08 14:00:00', NULL, NULL, NULL); INSERT INTO feedback (id, customer_id, source, from_name, from_email, quote, received_at, captured_by, external_id, state, theme_id, dismiss_reason, created_at) VALUES ('feedback-f1', 'customer-acme', 'ticket', 'Priya Shah', 'priya@acme.example', 'We need SSO before we can roll this out to the whole company.', '2026-10-05 04:00:00', NULL, 'seed-ticket-f1', 'linked', 'theme-sso', NULL, '2026-10-05 04:00:00'), ('feedback-f2', 'customer-acme', 'call', 'Tom Becker', 'tom@acme.example', 'IT keeps asking when we''ll support SSO with Okta.', '2026-10-10 04:00:00', 'person-ben', NULL, 'linked', 'theme-sso', NULL, '2026-10-10 04:00:00'), ('feedback-f3', 'customer-ridgeway', 'email', 'Ella Brooks', 'ella@ridgeway.example', 'Is there any way to export our project list to CSV?', '2026-09-14 04:00:00', NULL, 'seed-email-f3', 'linked', 'theme-csv', NULL, '2026-09-14 04:00:00'), ('feedback-f4', 'customer-olsen', 'in_app', 'Kim Olsen', 'kim@olsen.example', 'Would love Slack alerts when a client approves something.', '2026-10-08 04:00:00', 'person-jo', NULL, 'linked', 'theme-slack', NULL, '2026-10-08 04:00:00'), ('feedback-f5', 'customer-harbor', 'call', 'Rosa Diaz', 'rosa@harbor.example', 'Can our clients see a progress link without logging in?', '2026-10-13 04:00:00', 'person-ben', NULL, 'inbox', NULL, NULL, '2026-10-13 04:00:00'); -- The spec gives no vote dates; both are stamped at the start of T. INSERT INTO votes (theme_id, customer_id, recorded_by, created_at) VALUES ('theme-sso', 'customer-acme', 'person-ben', '2026-10-14 04:00:00'), ('theme-sso', 'customer-harbor', 'person-ben', '2026-10-14 04:00:00'); INSERT INTO status_changes (id, theme_id, from_status, to_status, note, actor_id, created_at) VALUES ('status-change-sso-1', 'theme-sso', NULL, 'under_review', 'Promoted to the roadmap', 'person-maya', '2026-10-11 14:00:00'), ('status-change-sso-2', 'theme-sso', 'under_review', 'planned', 'Scheduled for this quarter', 'person-sam', '2026-10-12 14:00:00'), ('status-change-csv-1', 'theme-csv', NULL, 'under_review', 'Promoted to the roadmap', 'person-maya', '2026-09-16 14:00:00'), ('status-change-csv-2', 'theme-csv', 'under_review', 'in_progress', 'Started', 'person-maya', '2026-09-30 14:00:00'), ('status-change-csv-3', 'theme-csv', 'in_progress', 'shipped', 'Released in version 2.14', 'person-maya', '2026-10-13 14:00:00'); INSERT INTO follow_ups (id, theme_id, shipped_change_id, customer_id, status, done_by, done_at, note) VALUES ('follow-up-csv-ridgeway', 'theme-csv', 'status-change-csv-3', 'customer-ridgeway', 'pending', NULL, NULL, NULL); -- The events section 14 names. Linking events are left out: the spec doesn't say who linked F1 to F4. INSERT INTO events (id, actor_id, feedback_id, theme_id, type, data, created_at) VALUES ('event-01', NULL, 'feedback-f3', NULL, 'inbound_received', NULL, '2026-09-14 04:00:00'), ('event-02', 'person-maya', NULL, 'theme-csv', 'theme_created', NULL, '2026-09-14 14:00:00'), ('event-03', 'person-maya', NULL, 'theme-csv', 'promoted', NULL, '2026-09-16 14:00:00'), ('event-04', 'person-maya', NULL, 'theme-csv', 'status_changed', NULL, '2026-09-30 14:00:00'), ('event-05', NULL, 'feedback-f1', NULL, 'inbound_received', NULL, '2026-10-05 04:00:00'), ('event-06', 'person-jo', NULL, 'theme-sso', 'theme_created', NULL, '2026-10-05 14:00:00'), ('event-07', 'person-jo', 'feedback-f4', NULL, 'captured', NULL, '2026-10-08 04:00:00'), ('event-08', 'person-sam', NULL, 'theme-slack', 'theme_created', NULL, '2026-10-08 14:00:00'), ('event-09', 'person-ben', 'feedback-f2', NULL, 'captured', NULL, '2026-10-10 04:00:00'), ('event-10', 'person-maya', NULL, 'theme-sso', 'promoted', NULL, '2026-10-11 14:00:00'), ('event-11', 'person-sam', NULL, 'theme-sso', 'status_changed', NULL, '2026-10-12 14:00:00'), ('event-12', 'person-ben', 'feedback-f5', NULL, 'captured', NULL, '2026-10-13 04:00:00'), ('event-13', 'person-maya', NULL, 'theme-csv', 'status_changed', NULL, '2026-10-13 14:00:00'), ('event-14', 'person-ben', NULL, 'theme-sso', 'vote_added', NULL, '2026-10-14 04:00:00'), ('event-15', 'person-ben', NULL, 'theme-sso', 'vote_added', NULL, '2026-10-14 04:00:00');