ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / db/migrations/0038_connector_sync_state.sql

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / db/migrations/0038_connector_sync_state.sql
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberdb/migrations/0038_connector_sync_state.sql
Original SHA-25640cf3ac1674e73c3c27611cf2daa15e4eeab1435b91f940edeabfb524294774e
Git blob SHA01676088525ac04d0a2b26336251b3bf8d43c35c
Reading-copy SHA-25640cf3ac1674e73c3c27611cf2daa15e4eeab1435b91f940edeabfb524294774e

Original source ↗

Every recorded occurrence

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

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlfeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlcollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlmaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqltime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlpresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlvendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlphase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlfeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / db/migrations/0038_connector_sync_state.sqlcapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

-- +goose Up -- The enterprise connector incremental sync cursor. One row per (organization, connector), holding the -- watermark (the max updated timestamp ingested so far) so each sync pulls only records changed since the last -- run, plus lightweight run bookkeeping. It is the state behind the iCIMS ATS and Workday HRIS connectors that -- flow a consenting pilot tenant's live workforce data into the candidates table through the proven sourcing -- ingest path. Tenant scoped and RLS forced like every tenant table: a connector cursor can never leak or be -- written across orgs. The app role reads and writes its own org's cursor (the sync command runs as the app -- role under a tenant tx); it never deletes one. CREATE TABLE connector_sync_state ( organization_id uuid NOT NULL REFERENCES organizations(id), connector_name text NOT NULL, -- the stable connector id, e.g. icims or workday watermark timestamptz NOT NULL DEFAULT '1970-01-01T00:00:00Z', -- max updated ts ingested; the incremental window floor last_run_at timestamptz, -- when the connector last ran for this org records_synced bigint NOT NULL DEFAULT 0, -- cumulative records ingested, for operator visibility PRIMARY KEY (organization_id, connector_name) ); ALTER TABLE connector_sync_state ENABLE ROW LEVEL SECURITY; ALTER TABLE connector_sync_state FORCE ROW LEVEL SECURITY; CREATE POLICY connector_sync_state_isolation ON connector_sync_state USING (organization_id = NULLIF(current_setting('app.current_org_id', true), '')::uuid) WITH CHECK (organization_id = NULLIF(current_setting('app.current_org_id', true), '')::uuid); -- The app role reads its cursor, inserts it on the first run, and advances it each run. It never deletes a -- cursor (a sync watermark is operational state, not a record to purge in app code). GRANT SELECT, INSERT, UPDATE ON connector_sync_state TO missionmatch_app; -- +goose Down DROP TABLE IF EXISTS connector_sync_state;

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