Tearleads

access_manifest_container_grant_projection API Postgres table

Expanded direct grants for container access manifests.

Declared in packages/api-shared/src/schema/accessManifests.ts

Description

The signed manifest remains the source of truth. This projection gives sync and read paths an indexed way to discover current direct access seeds without scanning JSON manifest state.

Columns

  • iduuid
    • primary key
    • not null
    • default gen_random_uuid()

    Surrogate database primary key.

  • manifest_hashtext
    • not null

    Container access manifest whose direct grant set this row expands. Joined to accessManifestHeads it gives the current grants.

  • container_iduuid
    • not null

    Container the manifest describes.

  • access_leveltext
    • not null

    Granted access level: read, write, or admin.

  • subject_typetext
    • not null

    Kind of grantee: user or group.

  • subject_iduuid
    • not null

    Id of the granted user or group.

Indexes

  • access_manifest_container_grant_subject_manifest_idx(subject_type, subject_id, manifest_hash, container_id)
    • access_manifest_container_grant_container_manifest_idx(container_id, manifest_hash)
      • access_manifest_container_grant_unique_idx(manifest_hash, subject_type, subject_id, access_level)
        • unique