Skip to content

public.app

Columns

Name Type Default Nullable Children Parents Comment
createdAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
draftVersionId uuid true public.app_version Current working app version
id uuid false public.app_version
name varchar(128) false
namespace varchar(128) false Unique URL path segment for the app
projectId varchar(36) false public.project
publishedVersionId uuid true public.app_version Published app version; null when unpublished
updatedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
visibility varchar(16) 'project'::character varying false App access: everyone, project members, or instance users

Constraints

Name Type Definition
CHK_app_visibility CHECK CHECK (((visibility)::text = ANY ((ARRAY['public'::character varying, 'project'::character varying, 'instance'::character varying])::text[])))
FK_f84dd7eb539e46e0c233fa09b20 FOREIGN KEY FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE
PK_9478629fc093d229df09e560aea PRIMARY KEY PRIMARY KEY (id)
app_createdAt_not_null n NOT NULL "createdAt"
app_draftVersionId_foreign FOREIGN KEY FOREIGN KEY ("draftVersionId") REFERENCES app_version(id) ON DELETE SET NULL
app_id_not_null n NOT NULL id
app_name_not_null n NOT NULL name
app_namespace_not_null n NOT NULL namespace
app_projectId_not_null n NOT NULL "projectId"
app_publishedVersionId_foreign FOREIGN KEY FOREIGN KEY ("publishedVersionId") REFERENCES app_version(id) ON DELETE SET NULL
app_updatedAt_not_null n NOT NULL "updatedAt"
app_visibility_not_null n NOT NULL visibility

Indexes

Name Definition
IDX_a73a1fa47c9e5097660f1161b3 CREATE UNIQUE INDEX "IDX_a73a1fa47c9e5097660f1161b3" ON public.app USING btree (namespace)
IDX_ca0a32194dd73ba54acb0adabf CREATE INDEX "IDX_ca0a32194dd73ba54acb0adabf" ON public.app USING btree ("draftVersionId")
IDX_e1c99aaf677c86879562203218 CREATE INDEX "IDX_e1c99aaf677c86879562203218" ON public.app USING btree ("publishedVersionId")
IDX_f84dd7eb539e46e0c233fa09b2 CREATE INDEX "IDX_f84dd7eb539e46e0c233fa09b2" ON public.app USING btree ("projectId")
PK_9478629fc093d229df09e560aea CREATE UNIQUE INDEX "PK_9478629fc093d229df09e560aea" ON public.app USING btree (id)

Relations

erDiagram

"public.app" }o--o| "public.app_version" : "FOREIGN KEY (#quot;draftVersionId#quot;) REFERENCES app_version(id) ON DELETE SET NULL"
"public.app_version" }o--|| "public.app" : "FOREIGN KEY (#quot;appId#quot;) REFERENCES app(id) ON DELETE CASCADE"
"public.app" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.app" }o--o| "public.app_version" : "FOREIGN KEY (#quot;publishedVersionId#quot;) REFERENCES app_version(id) ON DELETE SET NULL"

"public.app" {
  timestamp_3__with_time_zone createdAt
  uuid draftVersionId FK
  uuid id
  varchar_128_ name
  varchar_128_ namespace
  varchar_36_ projectId FK
  uuid publishedVersionId FK
  timestamp_3__with_time_zone updatedAt
  varchar_16_ visibility
}
"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
}
"public.project" {
  timestamp_3__with_time_zone createdAt
  uuid creatorId FK
  json customTelemetryTags
  varchar_512_ description
  json icon
  varchar_36_ id
  varchar_255_ name
  varchar_36_ type
  timestamp_3__with_time_zone updatedAt
}

Generated by tbls