ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / db/seed/demo_vendors.sql

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / db/seed/demo_vendors.sql
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberdb/seed/demo_vendors.sql
Original SHA-256e31ebdf59926a8618c156b3eca9ff73d772de4fb677faa602448808385587c28
Git blob SHAbcd2850ce4d37795fec17b5939fd86e3e5bb4fc6
Reading-copy SHA-256e31ebdf59926a8618c156b3eca9ff73d772de4fb677faa602448808385587c28

Original source ↗

Every recorded occurrence

These 4 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / db/seed/demo_vendors.sqlfeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / db/seed/demo_vendors.sqlmaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / db/seed/demo_vendors.sqlpresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / db/seed/demo_vendors.sqlfeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original

Recovered source transcript

-- Phase 2 Vendor Intelligence demo data. Seeds a small roster of staffing vendors and subcontractors for the -- demo org and a spread of vendor_submissions linking ALREADY EVALUATED candidate and requirement pairs to -- those vendors with varied lifecycle statuses, so the vendor_performance_scorecard and the k suppressed -- vendor_quality_distribution have a live scenario. It selects real evaluated pairs dynamically, so it works on -- both the clean demo seed and the restored live pool. Idempotent via fixed vendor ids and ON CONFLICT. All -- data is synthetic Demo data. Run as the migrator role after the candidate evaluations exist. \set org 11111111-1111-1111-1111-111111111111 BEGIN; -- Four vendors: two staffing firms, one subcontractor, one prime, with fixed ids so a rerun reasserts them. INSERT INTO staffing_vendors (organization_id, id, name, vendor_type) VALUES (:'org', 'd0000000-0000-0000-0000-000000000001', 'Apex Cleared Talent', 'staffing_firm'), (:'org', 'd0000000-0000-0000-0000-000000000002', 'Summit Federal Staffing', 'staffing_firm'), (:'org', 'd0000000-0000-0000-0000-000000000003', 'Trident Subcontracting', 'subcontractor'), (:'org', 'd0000000-0000-0000-0000-000000000004', 'Meridian Prime', 'prime') ON CONFLICT (organization_id, id) DO NOTHING; -- Submissions: take the first 160 evaluated candidate and requirement pairs, assign each to one of the four -- vendors round robin, give each a lifecycle status round robin, and set submitted_at a few days after the -- requirement was created so the time to submit is a clean positive interval. Round robin over a single pair -- means each pair goes to exactly one vendor, so the composite primary key never collides. Forty submissions -- per vendor clears the ten evaluated candidate quality floor so the scorecard quality publishes. INSERT INTO vendor_submissions (organization_id, vendor_id, candidate_id, requirement_id, status, submitted_at) SELECT :'org'::uuid, (ARRAY[ 'd0000000-0000-0000-0000-000000000001', 'd0000000-0000-0000-0000-000000000002', 'd0000000-0000-0000-0000-000000000003', 'd0000000-0000-0000-0000-000000000004' ])[1 + (rn % 4)]::uuid, candidate_id, requirement_id, -- status keys on rn/4 (integer division) so it is independent of the vendor (which keys on rn mod 4); each -- vendor therefore accrues a rotation of all four statuses across its submissions, giving varied fill rates. (ARRAY['placed', 'interviewed', 'submitted', 'rejected'])[1 + ((rn / 4) % 4)], created_at + ((1 + (rn % 12)) || ' days')::interval FROM ( SELECT ce.candidate_id, ce.requirement_id, r.created_at, row_number() OVER (ORDER BY ce.candidate_id, ce.requirement_id) - 1 AS rn FROM candidate_evaluations ce JOIN requirements r ON r.organization_id = ce.organization_id AND r.id = ce.requirement_id WHERE ce.organization_id = :'org' ORDER BY ce.candidate_id, ce.requirement_id LIMIT 160 ) x ON CONFLICT (organization_id, vendor_id, candidate_id, requirement_id) DO NOTHING; COMMIT;

Search equations, builds, manuscript text, and recovered sources.