Git and SSH
Git forges, connections, repositories, the webhook delivery ledger and user SSH keys.
Tables in this group: connection, delivery, forge, repository, ssh, watch.
connection
One Git provider grant to one organization, a GitHub App installation or a GitLab OAuth account connection, made through a forge row.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
organization_id | uuid | yes | Parent organization row (on delete cascade). |
forge_id | uuid | yes | Application the grant was made through; with external_installation_id it resolves a webhook delivery to exactly one row (cascades on forge delete). |
provider | text | yes | github or gitlab, denormalized from the forge as a filter column. |
external_installation_id | text | yes | Provider-side id as text: the numeric GitHub App installation id, or the GitLab user/group id; for GitHub unique per forge across the instance. |
account_login | varchar(255) | no | Login of the provider account the grant sits on (GitHub installation account or GitLab user), refreshed on every connect or reconnect. |
account_type | text | no | Provider account kind as GitHub reports it (User or Organization); always User for GitLab connections. |
suspended_at | timestamp(3) with time zone | no | Set while the provider reports the installation suspended or a token refresh failed; cleared on reconnect, and suspended rows are skipped by the trigger. |
oauth_envelope | jsonb | no | GitLab only: sealed OAuth pair as JSON accessTokenEnvelope, refreshTokenEnvelope, expiresAt, scope (tpsecret strings); NULL for GitHub. |
delivery
Replay-protection ledger of inbound webhook deliveries for every gate kind (GitHub, GitLab, Stripe); org-agnostic, secret-free, pruned after 7 days.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
provider | text | yes | Webhook gate kind that claimed the delivery: github, gitlab or stripe. |
external_delivery_id | text | yes | Provider delivery id: GitHub X-GitHub-Delivery, GitLab X-Gitlab-Event-UUID (else sha256: digest of the body), or the Stripe event id. |
event | text | no | Provider event name (push, check_suite, a Stripe event type) recorded for tracing only. |
object_id | text | no | Stripe data.object.id kept until projection settles so entitlement survives a crash after the 2xx; NULL for git deliveries. |
object_type | text | no | Stripe data.object.object (for example subscription) kept beside object_id for the projection sweep; NULL for git deliveries. |
projected_at | timestamp(3) with time zone | no | When the Stripe projection settled (success, skip or permanent error); NULL means pending retry and exempt from pruning, git rows stay NULL. |
forge
A registered Git provider application (GitHub App or GitLab OAuth app) that connections are granted through; organization_id NULL means instance-wide.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
organization_id | uuid | no | NULL means instance-wide (any organization may connect through it); set means the app belongs to that organization alone. |
name | varchar(255) | yes | Display name of the app; for GitHub Apps it is overwritten from the provider on each sync, and varchar(255) is that write's only length guard. |
provider | text | yes | Git provider kind, github or gitlab, chosen at registration and never changed. |
base_url | text | yes | Origin the app lives on (github.com, gitlab.com or a self-managed host); part of the unique key with provider and external_app_id. |
api_url | text | no | Explicit API origin for a GitHub Enterprise Server or self-managed GitLab; NULL means derive it from base_url. |
external_app_id | text | yes | Provider-side application id as text: the numeric GitHub App id (matches X-GitHub-Hook-Installation-Target-ID) or the GitLab OAuth application id. |
app_slug | varchar(255) | no | GitHub App slug used to build the install URL; filled by the manifest flow or sync, NULL for GitLab. |
client_id | text | no | OAuth client id the provider issued for this app; its secret is sealed in envelopes.clientSecretEnvelope. |
redirect_uri | text | no | OAuth redirect URI registered with the provider for the GitLab authorize flow; NULL for GitHub Apps. |
webhook_origin | text | no | Public origin the provider was told to deliver webhooks to at registration; NULL when none was recorded. |
custom_git_user | varchar(64) | no | SSH user for clone URLs of a self-hosted forge on a non-standard port (ssh://user@host:port/path); unused by GitHub App sources. |
custom_git_port | integer | no | SSH port for clone URLs of a self-hosted forge, paired with custom_git_user; unused by GitHub App sources. |
synced_at | timestamp(3) with time zone | no | Last successful reconcile of this row against the provider's own record of the app (the sync handler); NULL if never synced. |
envelopes | jsonb | yes | Sealed tpsecret envelopes under JSON keys privateKeyEnvelope, clientSecretEnvelope, webhookSecretEnvelope; never returned by the API. |
webhook_ref | varchar(64) | yes | Opaque unguessable routing token that ends this app's webhook URL (/webhook/github/ plus the token); it routes a delivery to its app, not a credential. |
webhook_token_hash | text | no | GitLab only: HMAC of the webhook token so a delivery on the unscoped path resolves in one indexed lookup; NULL for GitHub apps. |
is_public | boolean | yes | Whether the provider was told the app is publicly installable; set at creation (true for instance-wide apps) and refreshed from GitHub on sync. |
repository
One Git repository registered to an organization (one row per repo per org); workloads attach via project.repository_id or compose x-turbopanel.source refs.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
metadata | jsonb | no | Free-form jsonb the caller may send on repository create or patch; bookkeeping, never load-bearing, and the API folds the inspect columns into it on the wire. |
options | jsonb | no | Caller-supplied policy jsonb; the webhook trigger also parks pendingChecks (commitSha, ref, recordedAt) here in checks_passed mode. |
organization_id | uuid | yes | Parent organization row (on delete cascade). |
connection_id | uuid | no | Provider connection that authorizes clones and webhook matching; NULL for deploy-key and anonymous git lanes, set NULL when the connection is deleted. |
secret_id | uuid | no | Deploy key (secret row with the sealed private key) for SSH and deploy-key GitLab sources; NULL for connection-backed or anonymous repositories. |
provider | text | yes | github, gitlab, or git for a plain URL read through a connected server instead of a provider API. |
repository_url | text | yes | Clone URL stored canonicalized (lower-cased host, .git suffix, no trailing slash) so the per-organization unique dedupes spellings. |
repository_external_id | text | no | Provider-side repository/project id as text, used to match webhook deliveries because it survives renames; NULL for plain git. |
default_branch | varchar(255) | no | Tracked branch: operator-set, or copied from detected_default_branch while the row still follows the provider's default. |
subdirectory | text | no | Relative checkout subdirectory used as the build root, same rule as compose x-turbopanel.root; NULL means the repository root. |
auto_deploy | text | yes | Push-to-deploy mode: immediate, checks_passed (wait for a green check suite) or disabled (default); plain git never deploys on push. |
detected_default_branch | varchar(255) | no | Provider-reported default branch from the latest refresh or inspect, compared with default_branch to show drift. |
default_branch_checked_at | timestamp(3) with time zone | no | When detected_default_branch was last read from the provider. |
last_inspected_at | timestamp(3) with time zone | no | When the head commit was last inspected through the provider (the inspect route's bookkeeping). |
last_inspected_commit_sha | text | no | Head commit SHA observed at last_inspected_at. |
ssh
A public key that may authenticate as a principal over SSH; the daemon renders authorized_keys from it, and fingerprint lookups answer lost-laptop revocation.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
principal_id | uuid | yes | Parent principal row (on delete cascade). |
user_id | uuid | no | Org member who added the key: audit provenance, not ownership; set NULL on user delete so the key survives. |
name | text | yes | Operator-facing label (1 to 255 chars), distinct from the key's own comment. |
key_type | text | yes | SSH key algorithm from the CHECK list (ssh-ed25519, ecdsa-sha2-nistp*, their sk- FIDO variants, ssh-rsa); ssh-dss is rejected. |
public_key | text | yes | Canonical type base64 re-rendered from the decoded blob, never the pasted line; the comment moves to comment and a leading options field is rejected. |
fingerprint | text | yes | SHA256: plus unpadded base64 digest of the decoded blob, byte-identical to ssh-keygen -lf; unique per principal. |
comment | text | no | Sanitized display comment from the pasted line (printable ASCII, no quotes or backslashes, max 255); NULL when none. |
bits | integer | no | RSA modulus size in bits (minimum 2048); NULL for the fixed-size key types. |
watch
Which environment or project follows which repository, derived from the compose document that names it; a project row reaches every environment of the project.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
repository_id | uuid | yes | Parent repository row (on delete cascade). |
environment_id | uuid | no | Set when the environment own compose names the repository; exactly one of this and project_id is set. |
project_id | uuid | no | Set when the project compose names the repository; exactly one of this and environment_id is set. |
Last updated on