Skip to content

public.app_artifact

Columns

Name Type Default Nullable Children Parents Comment
appId uuid false No foreign key so the owning app ID remains available for cleanup after app deletion.
createdAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
id integer false public.app_version
sizeBytes integer false
storageKey text false Reference to the object within its storage backend
storedAt varchar(2) false Storage backend: database, filesystem, S3, or Azure
updatedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
uploadStatus varchar(16) 'pending'::character varying false Upload state: pending or completed

Constraints

Name Type Definition
CHK_app_artifact_storedAt CHECK CHECK ((("storedAt")::text = ANY ((ARRAY['db'::character varying, 'fs'::character varying, 's3'::character varying, 'az'::character varying])::text[])))
CHK_app_artifact_uploadStatus CHECK CHECK ((("uploadStatus")::text = ANY ((ARRAY['pending'::character varying, 'completed'::character varying])::text[])))
PK_307f7470d2b759f7c4bc056d3a5 PRIMARY KEY PRIMARY KEY (id)
app_artifact_appId_not_null n NOT NULL "appId"
app_artifact_createdAt_not_null n NOT NULL "createdAt"
app_artifact_id_not_null n NOT NULL id
app_artifact_sizeBytes_not_null n NOT NULL "sizeBytes"
app_artifact_storageKey_not_null n NOT NULL "storageKey"
app_artifact_storedAt_not_null n NOT NULL "storedAt"
app_artifact_updatedAt_not_null n NOT NULL "updatedAt"
app_artifact_uploadStatus_not_null n NOT NULL "uploadStatus"

Indexes

Name Definition
PK_307f7470d2b759f7c4bc056d3a5 CREATE UNIQUE INDEX "PK_307f7470d2b759f7c4bc056d3a5" ON public.app_artifact USING btree (id)

Relations

erDiagram

"public.app_version" }o--o| "public.app_artifact" : "FOREIGN KEY (#quot;bundleArtifactId#quot;) REFERENCES app_artifact(id) ON DELETE SET NULL"
"public.app_version" }o--|| "public.app_artifact" : "FOREIGN KEY (#quot;sourceArtifactId#quot;) REFERENCES app_artifact(id) ON DELETE RESTRICT"

"public.app_artifact" {
  uuid appId
  timestamp_3__with_time_zone createdAt
  integer id
  integer sizeBytes
  text storageKey
  varchar_2_ storedAt
  timestamp_3__with_time_zone updatedAt
  varchar_16_ uploadStatus
}
"public.app_version" {
  uuid appId FK
  integer buildAttempts
  varchar_16_ buildStatus
  timestamp_3__with_time_zone buildStatusUpdatedAt
  integer bundleArtifactId FK
  timestamp_3__with_time_zone createdAt
  uuid id
  varchar_255_ label
  integer sourceArtifactId FK
  timestamp_3__with_time_zone updatedAt
}

Generated by tbls