Skip to content

Table: assets

This table references:

Referenced by:

ColumnTypeNullableNotes
iduuidnoDefault gen_random_uuid()
titletextnoDefault ''::text
descriptiontextnoDefault ''::text
asset_typebigintnoReferences asset_types(ref)
owner_user_refbigintyes
statustextnoDefault 'active'::text
file_hashtextyesReferences storage_objects(hash)
file_extensiontextyes
file_size_bytesbigintyes
accessintegernoDefault 0
has_imagebooleannoDefault false
is_transcodingbooleannoDefault false
metadatajsonbnoDefault '{}'::jsonb
origin_server_iduuidyes
created_attimestampnoDefault now()
updated_attimestampnoDefault now()
deleted_attimestampyes
search_texttsvectoryes
state_iduuidyesReferences workflow_states(id)
team_iduuidyesReferences teams(id)
processing_statustextnoDefault 'ready'::text
thumbhashbyteayes
processing_attemptsintegernoDefault 0
processing_errortextyes
processing_started_attimestampyes
processing_finished_attimestampyes
sensitivitytextnoDefault 'public'::text
page_countintegeryes
deleted_reasontextyes
  • CONSTRAINT assets_processing_status_check CHECK ((processing_status = ANY (ARRAY['pending'::text, 'processing'::text, 'ready'::text, 'failed'::text])))
  • CONSTRAINT assets_sensitivity_check CHECK ((sensitivity = ANY (ARRAY['public'::text, 'team'::text, 'restricted'::text, 'embargo'::text])))
  • CONSTRAINT assets_status_check CHECK ((status = ANY (ARRAY['draft'::text, 'active'::text, 'archived'::text])))
CREATE TABLE public.assets (
id uuid DEFAULT gen_random_uuid() NOT NULL,
title text DEFAULT ''::text NOT NULL,
description text DEFAULT ''::text NOT NULL,
asset_type bigint NOT NULL,
owner_user_ref bigint,
status text DEFAULT 'active'::text NOT NULL,
file_hash text,
file_extension text,
file_size_bytes bigint,
access integer DEFAULT 0 NOT NULL,
has_image boolean DEFAULT false NOT NULL,
is_transcoding boolean DEFAULT false NOT NULL,
metadata jsonb DEFAULT '{}'::jsonb NOT NULL,
origin_server_id uuid,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
deleted_at timestamp with time zone,
search_text tsvector,
state_id uuid,
team_id uuid,
processing_status text DEFAULT 'ready'::text NOT NULL,
thumbhash bytea,
processing_attempts integer DEFAULT 0 NOT NULL,
processing_error text,
processing_started_at timestamp with time zone,
processing_finished_at timestamp with time zone,
sensitivity text DEFAULT 'public'::text NOT NULL,
page_count integer,
deleted_reason text,
CONSTRAINT assets_processing_status_check CHECK ((processing_status = ANY (ARRAY['pending'::text, 'processing'::text, 'ready'::text, 'failed'::text]))),
CONSTRAINT assets_sensitivity_check CHECK ((sensitivity = ANY (ARRAY['public'::text, 'team'::text, 'restricted'::text, 'embargo'::text]))),
CONSTRAINT assets_status_check CHECK ((status = ANY (ARRAY['draft'::text, 'active'::text, 'archived'::text])))
);

Please see the schema overview for context. This document was last regenerated on 2026-07-26T08:25:29.520Z.