Table: posts
Connected to
Section titled “Connected to”This table references:
assets(id) via columncover_asset_idworkflow_states(id) via columnstate_idteams(id) via columnteam_idassets(id) via columncover_thumbnail_asset_id
Referenced by:
collection_posts— columnpost_idpost_acls— columnpost_idpost_assets— columnpost_idpost_tags— columnpost_id
Columns
Section titled “Columns”| Column | Type | Nullable | Notes |
|---|---|---|---|
id | uuid | no | Default gen_random_uuid() |
author_user_ref | bigint | no | — |
title | text | no | Default ''::text |
description | text | no | Default ''::text |
visibility | text | no | Default 'org-only'::text |
cover_asset_id | uuid | yes | References assets(id) |
posted_at | timestamp | no | Default now() |
like_count | bigint | no | Default 0 |
comment_count | bigint | no | Default 0 |
search_text | tsvector | yes | — |
origin_server_id | uuid | yes | — |
deleted_at | timestamp | yes | — |
created_at | timestamp | no | Default now() |
updated_at | timestamp | no | Default now() |
state_id | uuid | yes | References workflow_states(id); Default public.post_initial_state_id() |
team_id | uuid | yes | References teams(id) |
cover_thumbnail_asset_id | uuid | yes | References assets(id) |
subtitle_track_override | jsonb | yes | — |
deleted_reason | text | yes | — |
deleted_by_user_ref | bigint | yes | — |
mature | boolean | no | Default false |
ai_provenance | text | yes | — |
ai_pure | boolean | no | Default false |
cover_focal_x | double | yes | — |
cover_focal_y | double | yes | — |
comments_enabled | boolean | no | Default true |
Constraints
Section titled “Constraints”CONSTRAINT posts_ai_provenance_check CHECK (((ai_provenance IS NULL) OR (ai_provenance = ANY (ARRAY['none'::text, 'assisted'::text, 'generated'::text]))))CONSTRAINT posts_cover_focal_check CHECK ((((cover_focal_x IS NULL) AND (cover_focal_y IS NULL)) OR (((cover_focal_x >= (0)::double precision) AND (cover_focal_x <= (1)::double precision)) AND ((cover_focal_y >= (0)::double precision) AND (cover_focal_y <= (1)::double precision)))))CONSTRAINT posts_visibility_check CHECK ((visibility = ANY (ARRAY['private'::text, 'org-only'::text, 'followers'::text, 'explicit-share'::text, 'public'::text])))
Full DDL
Section titled “Full DDL”CREATE TABLE public.posts ( id uuid DEFAULT gen_random_uuid() NOT NULL, author_user_ref bigint NOT NULL, title text DEFAULT ''::text NOT NULL, description text DEFAULT ''::text NOT NULL, visibility text DEFAULT 'org-only'::text NOT NULL, cover_asset_id uuid, posted_at timestamp with time zone DEFAULT now() NOT NULL, like_count bigint DEFAULT 0 NOT NULL, comment_count bigint DEFAULT 0 NOT NULL, search_text tsvector, origin_server_id uuid, deleted_at timestamp with time zone, created_at timestamp with time zone DEFAULT now() NOT NULL, updated_at timestamp with time zone DEFAULT now() NOT NULL, state_id uuid DEFAULT public.post_initial_state_id(), team_id uuid, cover_thumbnail_asset_id uuid, subtitle_track_override jsonb, deleted_reason text, deleted_by_user_ref bigint, mature boolean DEFAULT false NOT NULL, ai_provenance text, ai_pure boolean DEFAULT false NOT NULL, cover_focal_x double precision, cover_focal_y double precision, comments_enabled boolean DEFAULT true NOT NULL, CONSTRAINT posts_ai_provenance_check CHECK (((ai_provenance IS NULL) OR (ai_provenance = ANY (ARRAY['none'::text, 'assisted'::text, 'generated'::text])))), CONSTRAINT posts_cover_focal_check CHECK ((((cover_focal_x IS NULL) AND (cover_focal_y IS NULL)) OR (((cover_focal_x >= (0)::double precision) AND (cover_focal_x <= (1)::double precision)) AND ((cover_focal_y >= (0)::double precision) AND (cover_focal_y <= (1)::double precision))))), CONSTRAINT posts_visibility_check CHECK ((visibility = ANY (ARRAY['private'::text, 'org-only'::text, 'followers'::text, 'explicit-share'::text, 'public'::text]))));Please see the schema overview for context. This document was last regenerated on 2026-09-23T03:23:00.434Z.