canopy-applications Data Model

For a contributor or intake-workflow implementer reading canopy_applications: every table in the effective schema with its policy-bearing columns and CHECKs, the intra-database relationships, and the complete migration inventory. Routes and handler behaviour live on canopy-applications API Reference; source: migrations/.

Actor columns (#1008). Every worker-attribution column is TEXT holding an opaque OIDC subject (never a UUID by contract, compared byte for byte). A service-reachable act is a pair: <col> (the human’s subject) + <col>_service (the calling service’s principal). A mandatory act’s pair CHECK is num_nonnulls(<col>, <col>_service) = 1; an optional act’s is ⇐ 1 and ties attribution to the act (present exactly when the act happened). A human-only act and a referent are a bare subject column. No nil-UUID sentinel remains.

Tables

Table Purpose and policy columns

applications

Root intake record, one row per submission: household_id, submitted_by, submitted_by_role, authorized_representative_id (a bare UUID, no FK), programs_requested TEXT[], submission_channel, received_at, and the filing anchor legal_filed_date + legal_filed_basis (CHECK business_hours / after_hours_shift / weekend_holiday_shift / calendar_day_receipt). status CHECK submitted / processing / data_collected / determined / withdrawn / denied / approved. Interview lifecycle: interview_required, interview_completed_at + the optional actor pair interview_completed_by / interview_completed_by_service (set in one compare-and-set; ck_applications_interview_completed_by_named: exactly one set iff completed), interview_waived / interview_waived_reason. Expedited screen: expedited_screened_at, expedited_eligible, expedited_basis. Applicant contact and recovery gate: notify_email, notify_phone_e164, sms_opt_in (NULL = never stated), confidentiality (CHECK standard / confidential / address_confidential / both), recovery_locked. Portal-reported income (#2231), written once by finalize: reported_income_sources TEXT[] (NULL = no report recorded: filed another way, a portal filing from before #2231, or a finalize that sent none; codes of the pack's [[intake.reported_income_sources]], held to the pack at finalize; the schema lists none) and reported_anyone_works (NULL = unanswered; set only beside a source array, applications_reported_income_pair_check). Renewal identity (#1728, 7 CFR 273.14), written once at filing: application_kind (CHECK initial / recertification), renews_certification_id (canopy-renewals id, no cross-DB FK), renewal_timely, renewal_certification_end_date — ck_applications_renewal_identity makes the three non-null iff the kind is recertification, and one recertification per certification is unique. Soft-delete via active.

application_programs

One row per (application, program). status CHECK pending / processing / data_collected / determined / approved / denied / withdrawn / voided (voided = the agency void of a duplicate SNAP episode superseded by a reopen, paired with voided_at / voided_reason / voiding_episode_id). The three clocks (#1637): standard_processing_deadline (the immutable statutory clock, computed by kind; NULL for wic/caps), expedited_participation_deadline (set once by a positive screen), current_workflow_deadline (mutable — extended by a pend, reset by a reopen or a postponement release); ck_application_programs_clock_pair ties them. Outcome: determination_id + determination_received_at, denial_reason_codes TEXT[], determination_basis_kind, determination_request_id (the eligibility request that produced the recorded determination, the sibling rule’s input; NULL counts as another request, #3202), administrative_denial_id (a row is rules-determined or administratively denied, never both), record_back_refusal JSONB (the standing #1707 refusal { determination_id, code, refused_at }, served on the wire row; cleared by the next recorded determination, #3202). Episode pointers and stamps: active_reopen_episode_id (only on a live row — ck_application_programs_reopen_pointer_live: active_reopen_episode_id IS NULL OR active, #2703; a writer that deactivates the row ends the episode and clears the pointer with it), active_postponement_episode_id, voided_letter_event_id, expedited_downgraded_at, disposition_reserved_at (the day-30 tx1 lease). tanf_service_type discriminator. Unique on (application_id, program) WHERE active.

application_interviews (#1638)

One row per interview appointment (7 CFR 273.2(e)(3)); scheduling columns are write-once — a change is a superseding row (superseded_by self-FK). context CHECK intake / recert, interview_mode CHECK telephone / face_to_face / home_visit / on_demand, scheduled_at XOR interview_by_date by mode (ck_interviews_when), the per-mode letter facts (dial-in or location set; contact_name, contact_phone), status CHECK scheduled / missed / completed / superseded / cancelled with closed_reason (waived / application_terminal / superseded_by_reopen), is_initial, the mandatory actor pair actor / actor_service (claim-derived; ck_interviews_actor_named), completed_at, waived_at. NOMI stamps (#1641/#1642): miss_kind (missed / superseded_predate), missed_detected_at, nomi_staged_at (send-once fence), nomi_source_event_id (UNIQUE), nomi_dispatched_at (the dispatch evidence). One open row per (application_id, context).

administrative_denials (#788)

One row per procedural denial (7 CFR 273.2(h)(2)): reason CHECK missed_interview / verification_not_provided with the evidence matrix (an interview_id XOR ≥ 1 verification ids), initiated_by (worker / system) with the claim-derived mandatory actor pair actor / actor_service (ck_administrative_denials_actor_named; administrative_denials_actor_ck: system ⇔ a service; the day-30 drain names canopy-applications), legal_denied_date, and reopen_deadline_date — the letter’s snapshotted reopen-by day, nullable since #1997 (NULL = the jurisdiction grants no reopen right; ck_administrative_denials_snap_reopen_right keeps it NOT NULL for SNAP). One active denial per (application, program) initial episode and per explicit episode: episode_id is NULL for the initial intake episode and the reopen episode the denial ends for a post-reopen denial (#2677 — the writer reads active_reopen_episode_id under the row lock); (application_id, program, idempotency_key) is the replay anchor.

application_agency_pends (#1654)

The (h)(3) agency-fault pend episodes: cause CHECK no_interview_scheduled / nomi_not_dispatched / checklist_not_dispatched / verification_window_overran_sop, pended_on / pended_at, prior_deadline, extended_deadline (CHECK strictly forward), letter_event_id (UNIQUE). A re-pend is a new row.

application_reopen_episodes (#1655)

Append-only reopen episodes of a procedural denial (7 CFR 273.2(h)(2); 273.14(e)(2) for arm R): administrative_denial_id, cure_kind CHECK verification_provided / interview_completed / attestation + JSONB cure_evidence, the server-derived cured_on, arm (ck_reopen_episode_arm: A / B / R) with benefit_effective_date and the immutable episode_processing_deadline, kind (initial / recertification; ck_reopen_episode_kind_arm ties recertification ⇔ R), the mandatory actor pair reopened_by / reopened_by_service (ck_reopen_episodes_actor_named, = 1, VALID), idempotency_key, and the CAS spine dispatch_generation, resulting_determination_id, state (open / determined / incomplete_closed — incomplete_closed = closed without a determination, including the episode a post-reopen administrative denial ends, #2677, and the open episode of a withdrawn application, #2703), settled_at. One open episode per (application, program).

reopen_cure_attestations (#1655)

A supervisor’s audited attestation of a cure date: attested_cured_on, non-empty reason, optional document_ids, claim-derived attested_by (the supervisor’s subject; a human-only act). The reopen endpoint resolves cured_on from this row by id, never from a caller-supplied date.

reopen_sagas (#1655)

One saga row per episode (reopen_episode_id UNIQUE) in the shared store/saga.rs shape: step (local_reopen → void_later_snap_episodes → cancel_void_side_records → dispatch_determination), state (running / awaiting_retry / incomplete / complete), attempt_count, next_attempt_at, the lease pair claimed_by / claim_expires_at, last_error.

application_postponement_episodes (#1662)

Expedited postponed-verification episodes of a SNAP row (7 CFR 273.2(i)(4)(iii); program CHECK snap): state CHECK postponed / completed / reverted / closed, postponed_items TEXT[], postponed_deadline, certification_months (CHECK 1 or 2), postponement_generation, the gate evidence identity_verification_id / interview_id, the actor pairs — mandatory postponed_by / postponed_by_service (ck_postponement_postponed_actor_named) and optional reverted_by / reverted_by_service (ck_postponement_reverted_actor_named; postponement_reverted_pair ties it to reverted_at; the saga’s compensation names canopy-applications) — reverted_reason CHECK identity_unverified / interview_not_completed / eligibility_proof_not_provided / verification_request_rejected, the settle pair resulting_determination_id / settled_at, closed_at, approval_letter_dispatched_at, and the #1660 in-cert conversion claim (conversion_generation, conversion_claimed_at) and settle triple (conversion_operation_id, conversion_determination_id, conversion_settled_at), each pair-CHECKed. One open episode per (application, program); (application_id, program, idempotency_key) unique.

postponement_sagas (#1662)

The postponement saga, same shape as reopen_sagas (episode_id UNIQUE): step (local_postpone → request_postponed_verifications → dispatch_determination, plus the re-entry steps cancel_postponed_verifications and dispatch_conversion), state, attempt_count, next_attempt_at, the lease pair, last_error, and error_code — the coded refusal an incomplete saga stopped on, surfaced on the worker panel.

day30_shadow_findings (#1653)

The day-30 disposition ledger, one row per (application, program, legal run day): arm (closed nine-token CHECK), would_action (deny / pend / none / skip), JSONB evidence, workflow_deadline, would_execute_on, and applied (ck_day30_findings_applied: shadow / applied / deferred / cutoff_deferred / kind_deferred / skipped).

authorized_representatives

Authorized-representative designations per household (7 CFR 273.2(n); ACA §1413): household_id, representative_person_id, relationship, written_consent_on_file, effective_date / expiration_date (inclusive), rep_kind (individual / organization) with the paired organization_kind / organization_name CHECK. Soft-delete via active.

authorized_representative_program_scopes (#1664)

The per-program authority grant: PK (designation_id, program) over the CHECKed 5-set snap / tanf / medicaid / caps / wic (CHIP is never rep-scopeable), with the reversible suspension pair suspended_by_disqualification_id / suspended_at.

rep_disqualifications (#1664)

The 7 CFR 273.2(n)(4) SNAP representation bar, person-scoped: reason (benefit_misuse / false_information), evidence class and refs, the status lifecycle noticing → pending → in_effect → expired plus cancelled / overturned (appeal_id required), the half-open [effective_from, effective_through) window with a btree_gist no-overlap EXCLUDE, the letter stamps rep_letter_enqueued_at / noticed_on / rep_letter_dispatched_at, the cancel stamps with the optional actor pair cancelled_by / cancelled_by_service (ck_rep_disq_cancelled_by_named), and created_by (the disqualifying supervisor’s subject). One open bar per person.

rep_disqualification_notice_recipients (#1666)

Notice provenance for a bar, one row per staged fan-out event: kind (initial / rescission / corrected), recipient_kind (household_member / authorized_representative), the designation, household and recipient person, and the staged event_id (UNIQUE). Exactly one initial rep letter per bar.

household_assignments (#408)

Per-worker case assignment — the source of truth other services gate assignment-scoped reads on (Pub 1075 AC-6). worker_id is the assigned worker’s subject — a referent, not the caller. Soft-delete via unassigned_at; one active row per (worker_id, household_id).

application_sections

Per-program intake sections, one active row per (application_id, program, section_name): payload JSONB is action metadata only (never SSN / DOB / amounts — those live in canopy-persons), completed_at, the mandatory editor pair last_edited_by / last_edited_by_service (ck_application_sections_last_edited_by_named). Soft-delete via active. A save binds completed_at, updated_at and, on insert, created_at from its one decision-clock read, the instant whose legal day its roster check reads (#3061). created_at and updated_at keep their DEFAULT now(): they are edit bookkeeping that no decision reads (the completeness gate reads only completed_at IS NOT NULL), so they stay class C under #3007’s rule, although the 20270212000000 header still gives the pre-#3061 reason. completed_at has no default.

application_id_codes (ADR-026)

The applicant-facing Application ID (code CHECK HH-[a-f0-9]{8}, UNIQUE), keyed on the reserved application_id (UNIQUE) with no FK to applications — minted at draft start, before any application row exists.

passcode_hashes (ADR-026)

argon2id hash of the applicant’s 12-digit passcode (digit_count CHECK 12), keyed on the reserved application_id with no FK; one active hash per application (WHERE revoked_at IS NULL), revoked rows kept for audit (revoked_at, revoke_reason).

application_drafts (ADR-026)

The client-side-encrypted Apply draft: kdf_salt, XChaCha20-Poly1305 ciphertext + nonce, enc_version, current_step (CHECK 1..4), the sliding expires_at (last_saved_at + 30 days). PK is the reserved application_id, no FK. The reaper deletes an expired draft only when no non-terminal finalize_operations row exists (ADR-038).

recovery_pending (ADR-026)

24-hour pending lost-credential recovery: reveal_at, the UNIQUE kill_switch_token, the notify_email / notify_phone_e164 snapshot, killed_at / completed_at, the initiator IP and device cookie. FK to applications (recovery is for submitted applications only); one active row per application.

application_documents (ADR-042)

Applicant/worker uploads: the object-store s3_key, content_type, size_bytes, sha256, the raw and sanitised filenames, document_type (a code of the pack's [[intake.document_types]], held to the pack at upload; the schema checks only its length, 1 to 64), document_kind, uploaded_by_source (applicant_portal / worker_intake), the mutually exclusive review pairs accepted_at / accepted_by and rejection_reason / rejected_by (reviewer subjects), and the scan-promotion queue: scan_status (default pending), verdict provenance (scan_backend, scan_backend_version, scanned_at, scan_detail), the worker claim triple, scan_attempts / scan_due_at / scan_generation / scan_last_error, and the supervisor override triple. Seven named CHECKs hold the state machine, including ck_docs_accepted_viewable. FK to applications; person_id is a bare UUID.

finalize_operations (ADR-038)

The durable finalize-saga record, one row per reserved application id (no FK to the draft, which the final transaction deletes): state CHECK in_progress / compensating / completed / aborted, the fencing lease lease_holder / lease_expires_at, the pinned inputs basis_date, received_at, request_digest, household_id (set at completion), events_released, attempts. Three CHECKs pin lease-with-live-attempt, household-on-completion and no-lease-when-terminal.

finalize_steps (ADR-038)

Local skip-cache of the persons-side finalize receipts: PK (application_id, generation, step_key) → remote_kind (CHECK person / household / member / income / asset / expense / address) + remote_id; FK to finalize_operations ON DELETE CASCADE.

event_outbox / event_inbox

Generated ADR-018 / ADR-039 outbox and inbox — documented once on the data-models index.

scheduler_runs (#1211)

The daily-scheduler window fence (canopy-applications.draft-reaper, canopy-applications.recovery-pruner), single-sourced in crates/canopy-db/scheduler-migrations/ — documented once on the data-models index.

idempotency_keys (runtime DDL)

The fleet idempotency cache, created before the migrator runs by canopy_db::ensure_idempotency_schema (canopy_api::bootstrap::apply_migrations_on; canopy-manage migrate apply makes the same call); shape owned by crates/canopy-db/src/idempotency_schema.rs.

_sqlx_migrations (sqlx’s history table) is present as in every service.

Relationships

Intra-database foreign keys are ordinary here — twenty-five REFERENCES across eight parent tables. The rule ADR-001 imposes is only that no FK crosses a service boundary. The credential and saga tables keyed on the reserved application id (application_id_codes, passcode_hashes, application_drafts, finalize_operations) deliberately carry no FK to applications, because they exist before the application row does. household_assignments, day30_shadow_findings, rep_disqualifications (a parent only), scheduler_runs, the outbox, inbox and idempotency tables carry no FK of their own.

Diagram

Cross-service FKs (ADR-001 boundary)

canopy-applications holds no Postgres-level foreign key to another service. household_id, submitted_by, representative_person_id and person_id name canopy-persons rows, and the actor and worker_id columns name OIDC subjects; all are application-level references — the orchestrator and the BFFs supply real ids, and existence is not enforced. application_programs.determination_id points into the program service’s database (canopy-snap / -tanf / -medicaid / -caps / -wic). applications.renews_certification_id (#1728) points into canopy-renewals' snap_certifications and is validated fail-closed at filing through the renewals HTTP read; the renewals side mirrors the link in snap_certifications.renewal_application_id.

Retention

canopy-applications holds no FTI or PHI; no Pub 1075 or HIPAA floor applies at this layer. The program floors, checked 2026-09-16 on the LII mirror (the eCFR refused this host): SNAP program records no less than 3 years from the month of origin (7 CFR 272.1(f)); TANF under the HHS uniform administrative requirements, 3 years from submission of the final financial report (2 CFR 200.334, adopted for HHS awards by 2 CFR 300.1; 45 CFR part 75 was removed effective 2025-10-01, 89 FR 80055); Medicaid, for as long as the case is active plus 3 years (42 CFR 431.17, 89 FR 22865). The longest applicable floor governs in a multi-program deployment. Retention is operator-driven (archive moves, not migration-driven destructive change — ADR-016 forward-only).

Indexes

  • applications — applications_household_idx; applications_status_idx, applications_submitted_by_received_at_idx, applications_received_at_idx (partial, WHERE active; #402); uq_applications_one_renewal_per_certification (unique partial, WHERE application_kind = 'recertification'; a 23505 is the 409 renewal_already_filed)

  • application_programs — application_programs_unique (unique partial, WHERE active); application_programs_program_active_idx; idx_application_programs_workflow_clock (the day-30 scan substrate); idx_application_programs_expedited_downgrade; idx_application_programs_active_reopen; idx_application_programs_active_postponement; idx_application_programs_post_lapse_candidates (partial, WHERE status = 'approved' AND determination_basis_kind = 'expedited_postponed')

  • application_interviews — interviews_open_row_uq (one open appointment per (application_id, context)), interviews_superseded_by_uq, uq_interviews_nomi_event; idx_interviews_application; idx_interviews_nomi_scan, idx_interviews_nomi_scan_od (the two NOMI drain legs)

  • administrative_denials — administrative_denials_initial_episode_uq, administrative_denials_episode_uq, administrative_denials_idempotency_uq; idx_administrative_denials_application

  • application_agency_pends — app_pends_application_idx

  • reopen family — reopen_episodes_one_open, reopen_episodes_idempotency_key, reopen_episodes_application_idx, reopen_attestations_application_idx, reopen_sagas_due_idx

  • postponement family — postponement_episodes_one_open, postponement_episodes_idempotency_key, postponement_episodes_application_idx, postponement_episodes_determination_idx, postponement_episodes_conversion_determination_idx, postponement_sagas_due_idx

  • day30_shadow_findings — idx_day30_shadow_run_day (plus the table’s UNIQUE (application_id, program, run_day))

  • representatives family — auth_reps_household_idx, auth_reps_person_idx; rep_disq_one_open_bar, rep_disq_pending_idx, rep_disq_in_effect_idx, the rep_disq_no_overlap EXCLUDE; rep_scope_suspended_by_idx; rep_disq_notice_recipients_disq_idx, rep_disq_one_initial_rep_letter

  • household_assignments — household_assignments_active_uniq, household_assignments_by_worker_active, household_assignments_by_household_active

  • application_sections — application_sections_unique, application_sections_app_program_idx, application_sections_last_edited_by_idx

  • credentials, drafts, recovery — application_id_codes_code_idx; passcode_hashes_active_per_app; application_drafts_expires_idx; recovery_pending_active_per_app, recovery_pending_reveal_due_idx

  • application_documents — application_documents_app_idx, application_documents_person_idx, application_documents_pending_idx, application_documents_scan_due_idx

  • finalize_operations — finalize_operations_stuck_idx, finalize_operations_unreleased_idx

  • event_outbox_* / event_inbox_* — the generated partial indexes, documented once on the data-models index; idx_idempotency_keys_created_at — runtime DDL beside its table

Migration files

The generated files — the eight outbox/inbox migrations (20260508000000, 20260516000000, 20260518004851, 20260713000000, 20260720000000, 20260803000000, 20260815000000, 20260904000000) and 20260905000000_create_scheduler_runs.sql — are documented once on the data-models index.

  • 20260401000000_create_applications_tables.sql — applications, application_programs, authorized_representatives and their first indexes

  • 20260510000000_add_list_filter_indexes.sql — #402: the caseload-search partial indexes

  • 20260511000000_create_household_assignments.sql — #408: household_assignments

  • 20260601000000_create_application_sections.sql — application_sections

  • 20260601000001_extend_applications_status.sql — applications_status_check + application_programs_status_check

  • 20260602000000_create_application_id_codes.sql — ADR-026: application_id_codes

  • 20260602000001_create_passcode_hashes.sql — ADR-026: passcode_hashes

  • 20260602000002_extend_applications_notify_columns.sql — notify_email / notify_phone_e164

  • 20260603000000_create_application_drafts.sql — ADR-026: application_drafts

  • 20260604000000_extend_applications_recovery_gate.sql — #634: confidentiality + recovery_locked

  • 20260604000001_create_recovery_pending.sql — recovery_pending

  • 20260605000000_create_application_documents.sql — application_documents

  • 20260714000000_create_finalize_operations.sql — ADR-038: finalize_operations

  • 20260714000001_create_finalize_steps.sql — ADR-038: finalize_steps

  • 20260722000000_finalize_steps_address_kind.sql — finalize_steps.remote_kind CHECK gains address

  • 20260722000001_document_rejected_by.sql — #1009: application_documents.rejected_by

  • 20260723170000_v7_pk_defaults.sql — #1173: drops the id defaults on household_assignments and recovery_pending (UUIDv7 bound at insert)

  • 20260808000000_v7_pk_defaults_remainder.sql — #1173: the same on application_sections, application_id_codes, passcode_hashes, application_documents

  • 20261106000000_document_scan_quarantine.sql — ADR-042 (#1006): the scan-queue columns, the seven state-machine CHECKs, the pending default, the legacy backfill, application_documents_scan_due_idx

  • 20261107000000_ufound_clock_split.sql — #1637: legal_filed_date / legal_filed_basis, the three-clock split on application_programs (the conflated processing_deadline dropped), idx_application_programs_workflow_clock

  • 20261124000000_application_interviews.sql — #1638: application_interviews and its unique / chain-read indexes

  • 20261125000000_interview_nomi_stamps.sql — #1641: miss_kind, nomi_staged_at, nomi_source_event_id, uq_interviews_nomi_event, idx_interviews_nomi_scan

  • 20261126000000_sms_opt_in.sql — #1639: applications.sms_opt_in

  • 20261127000000_nomi_on_demand_scan.sql — #1639: idx_interviews_nomi_scan_od

  • 20261129000000_nomi_dispatched_stamp.sql — #1642: application_interviews.nomi_dispatched_at

  • 20261201000000_administrative_denials.sql — #788: administrative_denials, its uniques, application_programs.administrative_denial_id + the either/or truth CHECK

  • 20261215000000_day30_shadow.sql — #1653: day30_shadow_findings, idx_day30_shadow_run_day, application_programs.disposition_reserved_at

  • 20261216000000_rep_program_scopes.sql — #1664: rep_kind / organization columns, rep_disqualifications (btree_gist EXCLUDE), authorized_representative_program_scopes + the all-programs backfill, auth_reps_person_idx

  • 20261218000000_rep_disqualification_notice_recipients.sql — #1666: rep_disqualification_notice_recipients

  • 20261219000000_day30_enforce.sql — #1654: application_agency_pends, application_programs.expedited_downgraded_at + its index, day30_shadow_findings.applied

  • 20261220000000_reopen_substrate.sql — #1655: application_reopen_episodes, reopen_cure_attestations, reopen_sagas, the application_programs reopen/void columns and the voided status token

  • 20261221000000_reopen_activation.sql — #1656: application_reopen_episodes.idempotency_key, application_programs.voided_letter_event_id, application_interviews.waived_at

  • 20261222000000_reopen_void_audit.sql — #1656: closed_reason gains superseded_by_reopen; application_reopen_episodes.reopened_by_service + ck_reopen_episodes_actor_named (NOT VALID; restated VALID by 20270113000000)

  • 20261223000000_postponement_episodes.sql — #1662: application_postponement_episodes, postponement_sagas, application_programs.active_postponement_episode_id + determination_basis_kind

  • 20261226000000_postponement_conversion_claim.sql — #1660: the conversion claim pair + settle triple and their CHECKs; the saga step CHECK gains dispatch_conversion

  • 20261227000000_post_lapse_flag_index.sql — #1663: idx_application_programs_post_lapse_candidates

  • 20261228000000_application_kind.sql — #1728: the renewal identity on applications, ck_applications_kind, ck_applications_renewal_identity, uq_applications_one_renewal_per_certification; ck_day30_findings_applied admits kind_deferred

  • 20261229000000_interview_context_recert.sql — #1729: ck_interviews_context widened to intake / recert + the backfill of chains on recertification rows

  • 20261230000000_reopen_episode_kind.sql — #1731: application_reopen_episodes.kind, the named ck_reopen_episode_arm (A / B / R), ck_reopen_episode_kind_arm

  • 20261231000000_filing_receipt_rule_basis.sql — #1853: ck_applications_legal_filed_basis gains calendar_day_receipt

  • 20270101000000_interview_completed_by.sql — #1734: applications.interview_completed_by_uuid

  • 20270102000000_administrative_denials_reopen_right_nullable.sql — #1997: reopen_deadline_date DROP NOT NULL, the non-SNAP history correction, ck_administrative_denials_snap_reopen_right

  • 20270113000000_actor_subjects.sql — #1008: the 14 actor columns retyped to TEXT subjects in one ordered, guarded pass — drop every CHECK naming a retyped column, retype (actor_uuid → actor, interview_completed_by_uuid → interview_completed_by, new _service columns), rewrite a nil subject beside a named service to NULL + that service, a guard that aborts naming cargo xtask dev restart on any row nobody can attribute (a historic system denial, a NULL interview actor, a nil subject with no service, an unattributed completion or cancel) and on any row whose UUID a service account’s sub may have filled (every application_sections row — canopy-web’s section proxy wrote as its service identity — and every cancelled rep_disqualifications row — the service arm recorded the caller’s sub), then every CHECK re-added over the pair, all VALID

  • 20270114000000_reopen_pointer_on_live_row.sql — #2703: repairs any open reopen episode an inactive program row still points at (closed incomplete_closed, settled_at = now(), pointer cleared), then adds ck_application_programs_reopen_pointer_live

  • 20270203000000_application_reported_income.sql — #2231: applications.reported_anyone_works + reported_income_sources, applications_reported_income_sources_check, applications_reported_income_pair_check

  • 20270212000000_decision_stamps_no_default.sql — #3014: drops the defaults of every decision stamp the service’s production INSERTs bind themselves: applications.submitted_at / received_at, administrative_denials.denied_at, application_agency_pends.pended_at and application_interviews.created_at. An insert that names no stamp now fails instead of taking the database clock, and cargo xtask migrations-lint refuses a new clock default (#2589). Every other clock default stays; the file’s header names each, with its reason (#3007)

  • 20270301000000_determination_projection.sql — #3202: application_programs.determination_request_id and record_back_refusal

  • 20270302000000_document_type_pack_owned.sql — #3497: application_documents.document_type loses its list of codes (a length check, 1 to 64, replaces it); the pack's [[intake.document_types]] is the authority.

  • 20270303000000_reported_income_sources_pack_owned.sql — #3498: applications_reported_income_sources_check is dropped; the pack's [[intake.reported_income_sources]] is the authority. The pair check stays.

All migrations are forward-only per ADR-016.

Edit this page · default