Files
helmdocs-proposal-system/migrations/meta/0001_snapshot.json
Christian da74362d00 Initial v1 code layout
The destination of the wayfinder map: directory and module structure, the
domain model as real schema files, permission boundaries expressed as code,
and typed seams where the undecided parts land.

Satisfies the four structural requirements earlier resolutions handed to a
layout that did not exist:

  - a single database entry point (#11) — the pool is not exported
  - a scheduler entry point with actor context and no request (#13)
  - an entitlement assertion helper (#20, #34) — its call sites are the
    paid-feature list
  - an enumerated list of privileged RLS bypasses (#33) — three of them

Seams carry real types and throw with the ticket that owns them, so the
skeleton wires up and fails only where a decision is genuinely missing.

Verified: tsc --noEmit clean; drizzle-kit generate produces RLS on 18 tables
and 6 policies calling the release-level functions.

Resolves #35

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 17:20:47 -04:00

2987 lines
78 KiB
JSON

{
"id": "66b35631-1704-4999-86d6-837ea471fe54",
"prevId": "7df8b799-6a58-4fb1-9143-d9a3530a8672",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.actor": {
"name": "actor",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"display_name": {
"name": "display_name",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"actor_email_unique": {
"name": "actor_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.membership": {
"name": "membership",
"schema": "",
"columns": {
"actor_id": {
"name": "actor_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"membership_actor_id_actor_id_fk": {
"name": "membership_actor_id_actor_id_fk",
"tableFrom": "membership",
"tableTo": "actor",
"columnsFrom": [
"actor_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"membership_org_id_organization_id_fk": {
"name": "membership_org_id_organization_id_fk",
"tableFrom": "membership",
"tableTo": "organization",
"columnsFrom": [
"org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"membership_actor_id_org_id_pk": {
"name": "membership_actor_id_org_id_pk",
"columns": [
"actor_id",
"org_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.org_capability": {
"name": "org_capability",
"schema": "",
"columns": {
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"capability": {
"name": "capability",
"type": "capability",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"granted_at": {
"name": "granted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"org_capability_org_id_organization_id_fk": {
"name": "org_capability_org_id_organization_id_fk",
"tableFrom": "org_capability",
"tableTo": "organization",
"columnsFrom": [
"org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"org_capability_org_id_capability_pk": {
"name": "org_capability_org_id_capability_pk",
"columns": [
"org_id",
"capability"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.organization": {
"name": "organization",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"legal_name": {
"name": "legal_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.roster_entry": {
"name": "roster_entry",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"contact_email": {
"name": "contact_email",
"type": "text",
"primaryKey": false,
"notNull": false
},
"duns": {
"name": "duns",
"type": "text",
"primaryKey": false,
"notNull": false
},
"claimed_vendor_org_id": {
"name": "claimed_vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"claimed_at": {
"name": "claimed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"roster_entry_retailer_org_id_organization_id_fk": {
"name": "roster_entry_retailer_org_id_organization_id_fk",
"tableFrom": "roster_entry",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"roster_entry_claimed_vendor_org_id_organization_id_fk": {
"name": "roster_entry_claimed_vendor_org_id_organization_id_fk",
"tableFrom": "roster_entry",
"tableTo": "organization",
"columnsFrom": [
"claimed_vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"roster_entry_retailer_org_id_name_unique": {
"name": "roster_entry_retailer_org_id_name_unique",
"nullsNotDistinct": false,
"columns": [
"retailer_org_id",
"name"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.category_change_event": {
"name": "category_change_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"kind": {
"name": "kind",
"type": "category_change_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"from_ids": {
"name": "from_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true
},
"to_ids": {
"name": "to_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true
},
"rows_written": {
"name": "rows_written",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"performed_by": {
"name": "performed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"performed_at": {
"name": "performed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"category_change_event_retailer_org_id_organization_id_fk": {
"name": "category_change_event_retailer_org_id_organization_id_fk",
"tableFrom": "category_change_event",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.eligibility": {
"name": "eligibility",
"schema": "",
"columns": {
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"local_category_id": {
"name": "local_category_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"provenance": {
"name": "provenance",
"type": "grant_provenance",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'manual'"
},
"provenance_event_id": {
"name": "provenance_event_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"granted_at": {
"name": "granted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"revoked_at": {
"name": "revoked_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"eligibility_retailer_org_id_organization_id_fk": {
"name": "eligibility_retailer_org_id_organization_id_fk",
"tableFrom": "eligibility",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"eligibility_vendor_org_id_organization_id_fk": {
"name": "eligibility_vendor_org_id_organization_id_fk",
"tableFrom": "eligibility",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"eligibility_local_category_id_local_category_id_fk": {
"name": "eligibility_local_category_id_local_category_id_fk",
"tableFrom": "eligibility",
"tableTo": "local_category",
"columnsFrom": [
"local_category_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"eligibility_retailer_org_id_vendor_org_id_local_category_id_pk": {
"name": "eligibility_retailer_org_id_vendor_org_id_local_category_id_pk",
"columns": [
"retailer_org_id",
"vendor_org_id",
"local_category_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.local_category": {
"name": "local_category",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"spine_leaf_id": {
"name": "spine_leaf_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"valid_from": {
"name": "valid_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"valid_to": {
"name": "valid_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"superseded_by": {
"name": "superseded_by",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
}
},
"indexes": {},
"foreignKeys": {
"local_category_retailer_org_id_organization_id_fk": {
"name": "local_category_retailer_org_id_organization_id_fk",
"tableFrom": "local_category",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"local_category_spine_leaf_id_spine_node_id_fk": {
"name": "local_category_spine_leaf_id_spine_node_id_fk",
"tableFrom": "local_category",
"tableTo": "spine_node",
"columnsFrom": [
"spine_leaf_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.spine_node": {
"name": "spine_node",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"group_id": {
"name": "group_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"unspsc_families": {
"name": "unspsc_families",
"type": "text[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"valid_from": {
"name": "valid_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"valid_to": {
"name": "valid_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"superseded_by": {
"name": "superseded_by",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.criterion": {
"name": "criterion",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"max_points": {
"name": "max_points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"weight": {
"name": "weight",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"scale_anchors": {
"name": "scale_anchors",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
}
},
"indexes": {},
"foreignKeys": {
"criterion_solicitation_id_solicitation_id_fk": {
"name": "criterion_solicitation_id_solicitation_id_fk",
"tableFrom": "criterion",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.criterion_requirement": {
"name": "criterion_requirement",
"schema": "",
"columns": {
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"frozen_at": {
"name": "frozen_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"criterion_requirement_criterion_id_criterion_id_fk": {
"name": "criterion_requirement_criterion_id_criterion_id_fk",
"tableFrom": "criterion_requirement",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"criterion_requirement_requirement_id_requirement_id_fk": {
"name": "criterion_requirement_requirement_id_requirement_id_fk",
"tableFrom": "criterion_requirement",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"criterion_requirement_criterion_id_requirement_id_pk": {
"name": "criterion_requirement_criterion_id_requirement_id_pk",
"columns": [
"criterion_id",
"requirement_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.evaluation_scenario": {
"name": "evaluation_scenario",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"declared_at": {
"name": "declared_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"evaluation_scenario_solicitation_id_solicitation_id_fk": {
"name": "evaluation_scenario_solicitation_id_solicitation_id_fk",
"tableFrom": "evaluation_scenario",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.price_line": {
"name": "price_line",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"unit": {
"name": "unit",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"price_line_solicitation_id_solicitation_id_fk": {
"name": "price_line_solicitation_id_solicitation_id_fk",
"tableFrom": "price_line",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.requirement": {
"name": "requirement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"ordinal": {
"name": "ordinal",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "requirement_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"response_obligation": {
"name": "response_obligation",
"type": "text",
"primaryKey": false,
"notNull": false
},
"provenance_document_id": {
"name": "provenance_document_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"provenance_page": {
"name": "provenance_page",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"provenance_span": {
"name": "provenance_span",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"confirmation_state": {
"name": "confirmation_state",
"type": "confirmation_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'unconfirmed'"
},
"confirmed_by": {
"name": "confirmed_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"confirmed_at": {
"name": "confirmed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"requirement_solicitation_id_solicitation_id_fk": {
"name": "requirement_solicitation_id_solicitation_id_fk",
"tableFrom": "requirement",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"requirement_provenance_document_id_solicitation_document_id_fk": {
"name": "requirement_provenance_document_id_solicitation_document_id_fk",
"tableFrom": "requirement",
"tableTo": "solicitation_document",
"columnsFrom": [
"provenance_document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.scenario_quantity": {
"name": "scenario_quantity",
"schema": "",
"columns": {
"scenario_id": {
"name": "scenario_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"price_line_id": {
"name": "price_line_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"quantity": {
"name": "quantity",
"type": "numeric(14, 3)",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"scenario_quantity_scenario_id_evaluation_scenario_id_fk": {
"name": "scenario_quantity_scenario_id_evaluation_scenario_id_fk",
"tableFrom": "scenario_quantity",
"tableTo": "evaluation_scenario",
"columnsFrom": [
"scenario_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"scenario_quantity_price_line_id_price_line_id_fk": {
"name": "scenario_quantity_price_line_id_price_line_id_fk",
"tableFrom": "scenario_quantity",
"tableTo": "price_line",
"columnsFrom": [
"price_line_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"scenario_quantity_scenario_id_price_line_id_pk": {
"name": "scenario_quantity_scenario_id_price_line_id_pk",
"columns": [
"scenario_id",
"price_line_id"
]
}
},
"uniqueConstraints": {},
"policies": {
"scenario_quantity_read": {
"name": "scenario_quantity_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_solicitation(\n (SELECT solicitation_id FROM evaluation_scenario WHERE id = scenario_id)\n ), 'scenario_quantity')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.solicitation": {
"name": "solicitation",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"issuer_org_id": {
"name": "issuer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"local_category_id": {
"name": "local_category_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"stage": {
"name": "stage",
"type": "solicitation_stage",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'draft'"
},
"issued_at": {
"name": "issued_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"responses_due_at": {
"name": "responses_due_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"acknowledgement_required": {
"name": "acknowledgement_required",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"volume_band": {
"name": "volume_band",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"solicitation_issuer_org_id_organization_id_fk": {
"name": "solicitation_issuer_org_id_organization_id_fk",
"tableFrom": "solicitation",
"tableTo": "organization",
"columnsFrom": [
"issuer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"solicitation_local_category_id_local_category_id_fk": {
"name": "solicitation_local_category_id_local_category_id_fk",
"tableFrom": "solicitation",
"tableTo": "local_category",
"columnsFrom": [
"local_category_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.solicitation_amendment": {
"name": "solicitation_amendment",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"class": {
"name": "class",
"type": "amendment_class",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"summary": {
"name": "summary",
"type": "text",
"primaryKey": false,
"notNull": true
},
"requirement_ids": {
"name": "requirement_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"deadline_extended_to": {
"name": "deadline_extended_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_at": {
"name": "authored_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"solicitation_amendment_solicitation_id_solicitation_id_fk": {
"name": "solicitation_amendment_solicitation_id_solicitation_id_fk",
"tableFrom": "solicitation_amendment",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.solicitation_document": {
"name": "solicitation_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "text",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"solicitation_document_solicitation_id_solicitation_id_fk": {
"name": "solicitation_document_solicitation_id_solicitation_id_fk",
"tableFrom": "solicitation_document",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.answer": {
"name": "answer",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"coverage": {
"name": "coverage",
"type": "coverage",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": false
},
"provenance_document_id": {
"name": "provenance_document_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"provenance_page": {
"name": "provenance_page",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"provenance_span": {
"name": "provenance_span",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"vendor_attested": {
"name": "vendor_attested",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"reopened_by_amendment_id": {
"name": "reopened_by_amendment_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"answer_response_id_response_id_fk": {
"name": "answer_response_id_response_id_fk",
"tableFrom": "answer",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"answer_requirement_id_requirement_id_fk": {
"name": "answer_requirement_id_requirement_id_fk",
"tableFrom": "answer",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"answer_provenance_document_id_response_document_id_fk": {
"name": "answer_provenance_document_id_response_document_id_fk",
"tableFrom": "answer",
"tableTo": "response_document",
"columnsFrom": [
"provenance_document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"answer_read": {
"name": "answer_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'answer_text')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.derived_cost": {
"name": "derived_cost",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"scenario_id": {
"name": "scenario_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"amount": {
"name": "amount",
"type": "numeric(16, 2)",
"primaryKey": false,
"notNull": true
},
"computed_at": {
"name": "computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"derived_cost_response_id_response_id_fk": {
"name": "derived_cost_response_id_response_id_fk",
"tableFrom": "derived_cost",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"derived_cost_scenario_id_evaluation_scenario_id_fk": {
"name": "derived_cost_scenario_id_evaluation_scenario_id_fk",
"tableFrom": "derived_cost",
"tableTo": "evaluation_scenario",
"columnsFrom": [
"scenario_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"derived_cost_read": {
"name": "derived_cost_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'derived_cost')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.exception": {
"name": "exception",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"price_delta": {
"name": "price_delta",
"type": "numeric(14, 2)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"exception_response_id_response_id_fk": {
"name": "exception_response_id_response_id_fk",
"tableFrom": "exception",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"exception_requirement_id_requirement_id_fk": {
"name": "exception_requirement_id_requirement_id_fk",
"tableFrom": "exception",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"exception_read": {
"name": "exception_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'exception_text')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.participation": {
"name": "participation",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "participation_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'invited'"
},
"acknowledged_at": {
"name": "acknowledged_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"participation_solicitation_id_solicitation_id_fk": {
"name": "participation_solicitation_id_solicitation_id_fk",
"tableFrom": "participation",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"participation_vendor_org_id_organization_id_fk": {
"name": "participation_vendor_org_id_organization_id_fk",
"tableFrom": "participation",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.price_quote": {
"name": "price_quote",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"price_line_id": {
"name": "price_line_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"rate_structure": {
"name": "rate_structure",
"type": "jsonb",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"price_quote_response_id_response_id_fk": {
"name": "price_quote_response_id_response_id_fk",
"tableFrom": "price_quote",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"price_quote_price_line_id_price_line_id_fk": {
"name": "price_quote_price_line_id_price_line_id_fk",
"tableFrom": "price_quote",
"tableTo": "price_line",
"columnsFrom": [
"price_line_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"price_quote_read": {
"name": "price_quote_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'price_quote')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.response": {
"name": "response",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"submitted_at": {
"name": "submitted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"attested_by": {
"name": "attested_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"attested_at": {
"name": "attested_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"response_solicitation_id_solicitation_id_fk": {
"name": "response_solicitation_id_solicitation_id_fk",
"tableFrom": "response",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"response_vendor_org_id_organization_id_fk": {
"name": "response_vendor_org_id_organization_id_fk",
"tableFrom": "response",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.response_document": {
"name": "response_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"response_document_response_id_response_id_fk": {
"name": "response_document_response_id_response_id_fk",
"tableFrom": "response_document",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.gate_result": {
"name": "gate_result",
"schema": "",
"columns": {
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"passed": {
"name": "passed",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"computed_at": {
"name": "computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"gate_result_response_id_response_id_fk": {
"name": "gate_result_response_id_response_id_fk",
"tableFrom": "gate_result",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"gate_result_requirement_id_requirement_id_fk": {
"name": "gate_result_requirement_id_requirement_id_fk",
"tableFrom": "gate_result",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.rubric_amendment": {
"name": "rubric_amendment",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": true
},
"voided_score_ids": {
"name": "voided_score_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_at": {
"name": "authored_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.score": {
"name": "score",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"points": {
"name": "points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"committed_by": {
"name": "committed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"committed_at": {
"name": "committed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"derived_from_suggestion_id": {
"name": "derived_from_suggestion_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"voided_by_amendment_id": {
"name": "voided_by_amendment_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"score_response_id_response_id_fk": {
"name": "score_response_id_response_id_fk",
"tableFrom": "score",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"score_criterion_id_criterion_id_fk": {
"name": "score_criterion_id_criterion_id_fk",
"tableFrom": "score",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"score_derived_from_suggestion_id_suggestion_id_fk": {
"name": "score_derived_from_suggestion_id_suggestion_id_fk",
"tableFrom": "score",
"tableTo": "suggestion",
"columnsFrom": [
"derived_from_suggestion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"score_read": {
"name": "score_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'own_scoring')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.suggestion": {
"name": "suggestion",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"proposed_points": {
"name": "proposed_points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": false
},
"anchor_matched": {
"name": "anchor_matched",
"type": "text",
"primaryKey": false,
"notNull": false
},
"citations": {
"name": "citations",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
},
"confidence": {
"name": "confidence",
"type": "numeric(4, 3)",
"primaryKey": false,
"notNull": false
},
"model_version": {
"name": "model_version",
"type": "text",
"primaryKey": false,
"notNull": true
},
"no_evidence_found": {
"name": "no_evidence_found",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"suggestion_response_id_response_id_fk": {
"name": "suggestion_response_id_response_id_fk",
"tableFrom": "suggestion",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"suggestion_criterion_id_criterion_id_fk": {
"name": "suggestion_criterion_id_criterion_id_fk",
"tableFrom": "suggestion",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.export_event": {
"name": "export_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"actor_id": {
"name": "actor_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"capability": {
"name": "capability",
"type": "text",
"primaryKey": false,
"notNull": true
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"classes": {
"name": "classes",
"type": "text[]",
"primaryKey": false,
"notNull": true
},
"row_count": {
"name": "row_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"at": {
"name": "at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.release_matrix": {
"name": "release_matrix",
"schema": "",
"columns": {
"version": {
"name": "version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"class": {
"name": "class",
"type": "disclosure_class",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"level": {
"name": "level",
"type": "release_level",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"released": {
"name": "released",
"type": "text",
"primaryKey": false,
"notNull": true
},
"effective_from": {
"name": "effective_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"release_matrix_version_class_level_pk": {
"name": "release_matrix_version_class_level_pk",
"columns": [
"version",
"class",
"level"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.document_type": {
"name": "document_type",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expiry_rule": {
"name": "expiry_rule",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.retailer_acceptance": {
"name": "retailer_acceptance",
"schema": "",
"columns": {
"document_id": {
"name": "document_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"accepted_at": {
"name": "accepted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"vendor_disclosed_name": {
"name": "vendor_disclosed_name",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"retailer_acceptance_document_id_vault_document_id_fk": {
"name": "retailer_acceptance_document_id_vault_document_id_fk",
"tableFrom": "retailer_acceptance",
"tableTo": "vault_document",
"columnsFrom": [
"document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"retailer_acceptance_retailer_org_id_organization_id_fk": {
"name": "retailer_acceptance_retailer_org_id_organization_id_fk",
"tableFrom": "retailer_acceptance",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"retailer_acceptance_document_id_retailer_org_id_pk": {
"name": "retailer_acceptance_document_id_retailer_org_id_pk",
"columns": [
"document_id",
"retailer_org_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.vault_document": {
"name": "vault_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"type_id": {
"name": "type_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"expiry_state": {
"name": "expiry_state",
"type": "expiry_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'current'"
},
"expiry_computed_at": {
"name": "expiry_computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"vault_document_vendor_org_id_organization_id_fk": {
"name": "vault_document_vendor_org_id_organization_id_fk",
"tableFrom": "vault_document",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"vault_document_type_id_document_type_id_fk": {
"name": "vault_document_type_id_document_type_id_fk",
"tableFrom": "vault_document",
"tableTo": "document_type",
"columnsFrom": [
"type_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.entitlement": {
"name": "entitlement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"beneficiary_org_id": {
"name": "beneficiary_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"payer_org_id": {
"name": "payer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"tier": {
"name": "tier",
"type": "tier",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"seats": {
"name": "seats",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"lapsed_at": {
"name": "lapsed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"entitlement_beneficiary_org_id_organization_id_fk": {
"name": "entitlement_beneficiary_org_id_organization_id_fk",
"tableFrom": "entitlement",
"tableTo": "organization",
"columnsFrom": [
"beneficiary_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"entitlement_payer_org_id_organization_id_fk": {
"name": "entitlement_payer_org_id_organization_id_fk",
"tableFrom": "entitlement",
"tableTo": "organization",
"columnsFrom": [
"payer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.confirmation_event": {
"name": "confirmation_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"confirmed_by": {
"name": "confirmed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"corrected": {
"name": "corrected",
"type": "text",
"primaryKey": false,
"notNull": false
},
"at": {
"name": "at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"confirmation_event_requirement_id_requirement_id_fk": {
"name": "confirmation_event_requirement_id_requirement_id_fk",
"tableFrom": "confirmation_event",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.sweep_finding": {
"name": "sweep_finding",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"document_id": {
"name": "document_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "sweep_finding_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"page": {
"name": "page",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"span": {
"name": "span",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"quoted_text": {
"name": "quoted_text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"resolved_by_requirement_id": {
"name": "resolved_by_requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"dismissed_by": {
"name": "dismissed_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"dismissed_at": {
"name": "dismissed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"sweep_finding_solicitation_id_solicitation_id_fk": {
"name": "sweep_finding_solicitation_id_solicitation_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"sweep_finding_document_id_solicitation_document_id_fk": {
"name": "sweep_finding_document_id_solicitation_document_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "solicitation_document",
"columnsFrom": [
"document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"sweep_finding_resolved_by_requirement_id_requirement_id_fk": {
"name": "sweep_finding_resolved_by_requirement_id_requirement_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "requirement",
"columnsFrom": [
"resolved_by_requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.vendor_omission_report": {
"name": "vendor_omission_report",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"body": {
"name": "body",
"type": "text",
"primaryKey": false,
"notNull": true
},
"reported_at": {
"name": "reported_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"acted_on_at": {
"name": "acted_on_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"acted_on_by": {
"name": "acted_on_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"vendor_omission_report_solicitation_id_solicitation_id_fk": {
"name": "vendor_omission_report_solicitation_id_solicitation_id_fk",
"tableFrom": "vendor_omission_report",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"public.capability": {
"name": "capability",
"schema": "public",
"values": [
"issuer",
"vendor"
]
},
"public.category_change_kind": {
"name": "category_change_kind",
"schema": "public",
"values": [
"split",
"merge",
"retire",
"remap"
]
},
"public.grant_provenance": {
"name": "grant_provenance",
"schema": "public",
"values": [
"manual",
"split_event",
"merge_event"
]
},
"public.amendment_class": {
"name": "amendment_class",
"schema": "public",
"values": [
"substantive",
"clarification"
]
},
"public.confirmation_state": {
"name": "confirmation_state",
"schema": "public",
"values": [
"unconfirmed",
"confirmed",
"corrected"
]
},
"public.requirement_kind": {
"name": "requirement_kind",
"schema": "public",
"values": [
"mandatory_gate",
"scored_criterion",
"certification_form",
"compliance_schedule",
"pricing",
"narrative"
]
},
"public.solicitation_stage": {
"name": "solicitation_stage",
"schema": "public",
"values": [
"draft",
"open",
"evaluating",
"finalists",
"awarded",
"cancelled"
]
},
"public.coverage": {
"name": "coverage",
"schema": "public",
"values": [
"answered",
"not_answered",
"indeterminate"
]
},
"public.participation_state": {
"name": "participation_state",
"schema": "public",
"values": [
"invited",
"opened",
"acknowledged",
"intends_to_bid",
"submitted",
"withdrawn"
]
},
"public.disclosure_class": {
"name": "disclosure_class",
"schema": "public",
"values": [
"vendor_identity",
"participation_signal",
"scenario_quantity",
"answer_text",
"exception_text",
"price_quote",
"derived_cost",
"vault_document",
"own_scoring"
]
},
"public.release_level": {
"name": "release_level",
"schema": "public",
"values": [
"none",
"invited",
"acknowledged",
"submitted",
"open",
"evaluating",
"finalist",
"awarded"
]
},
"public.expiry_state": {
"name": "expiry_state",
"schema": "public",
"values": [
"current",
"expiring_soon",
"expired"
]
},
"public.tier": {
"name": "tier",
"schema": "public",
"values": [
"base",
"pro",
"enterprise"
]
},
"public.sweep_finding_kind": {
"name": "sweep_finding_kind",
"schema": "public",
"values": [
"asserted_obligation",
"uncovered_span"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}