s
Tables (88)
activity_logs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- actor_type — "text" — NOT NULL
- actor_user_id — "uuid" — Foreign key
- action — "public"."activity_log_action" — NOT NULL
- target_type — "text" — NOT NULL
- target_id — "text" — NOT NULL
- parent_type — "text"
- parent_id — "text"
- metadata — "jsonb" — NOT NULL
- occurred_at — timestamp with time zone — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- dedupe_key — "text" — NOT NULL — Domain-provided idempotency key. Repeated delivery of one logical activity within a Workspace reuses the same key.
agent_confirmations
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- tool_name — "text" — NOT NULL
- status — "text" — NOT NULL
- risk_level — "text" — NOT NULL
- summary — "text" — NOT NULL
- plan_json — "jsonb" — NOT NULL
- approved_by_user_id — "uuid" — Foreign key
- rejected_by_user_id — "uuid" — Foreign key
- expires_at — timestamp with time zone — NOT NULL
- approved_at — timestamp with time zone
- rejected_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
agent_grounded_answer_outbox
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- workspace_id — "uuid" — NOT NULL
- source_ids — "jsonb" — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- next_attempt_at — timestamp with time zone — NOT NULL
- claimed_at — timestamp with time zone
- claim_token — "uuid"
- delivered_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
agent_logs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- step_id — "uuid" — Foreign key → agent_steps.id
- confirmation_id — "uuid" — Foreign key → agent_confirmations.id
- actor_type — "text" — NOT NULL
- actor_user_id — "uuid" — Foreign key
- level — "text" — NOT NULL
- event_type — "text" — NOT NULL
- message — "text" — NOT NULL
- metadata_json — "jsonb" — NOT NULL
- resource_refs — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
agent_run_messages
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- sequence — integer — NOT NULL
- role — "text" — NOT NULL
- content — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
agent_run_outbox
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- workspace_id — "uuid" — NOT NULL
- event_type — "text" — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- next_attempt_at — timestamp with time zone — NOT NULL
- claim_token — "uuid"
- claimed_at — timestamp with time zone
- delivered_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- turn_sequence — integer — NOT NULL — Monotonic planner turn generation. Delayed jobs from an older generation are ignored by the AI Worker.
- reason — "text" — NOT NULL — Safe reason that caused the current planner turn to be queued.
agent_runs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- requested_by_user_id — "uuid" — Foreign key
- client_request_id — "text" — Optional client idempotency key, unique per Workspace and requester while requester is retained.
- status — "text" — NOT NULL
- risk_level — "text"
- prompt — "text" — NOT NULL
- timezone — "text" — NOT NULL
- message — "text"
- final_answer — "text"
- error_code — "text"
- error_message — "text"
- expires_at — timestamp with time zone — NOT NULL
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- planner_turn_count — integer — NOT NULL
- tool_call_count — integer — NOT NULL
agent_steps
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → agent_runs.id — NOT NULL
- step_order — integer — NOT NULL
- step_type — "text" — NOT NULL
- status — "text" — NOT NULL
- tool_name — "text"
- risk_level — "text"
- input_json — "jsonb" — NOT NULL
- output_json — "jsonb" — NOT NULL
- resource_refs — "jsonb" — NOT NULL
- error_code — "text"
- error_message — "text"
- started_at — timestamp with time zone
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
board_columns
- id — bigint — Primary key — NOT NULL
- board_id — bigint — Foreign key → boards.id — NOT NULL
- status_option_id — "uuid" — Foreign key → github_project_v2_field_options.id
- status_option_github_id — "text"
- normalized_name — "text"
- name — character varying(255) — NOT NULL
- position — integer — NOT NULL
- color — character varying(30)
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
board_issue_create_operations
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- actor_user_id — "uuid" — Foreign key — NOT NULL
- board_id — bigint — Foreign key → board_columns.board_id — NOT NULL
- column_id — bigint — Foreign key → board_columns.id — NOT NULL
- idempotency_key — "text" — NOT NULL — Client-generated key scoped to one Workspace and actor.
- request_hash — "text" — NOT NULL
- request_title — character varying(255) — NOT NULL
- request_body — "text"
- status — "text" — NOT NULL
- completed_stage — "text" — NOT NULL — Last fully persisted remote or local step that a retry can safely resume after.
- lease_token — "uuid" — NOT NULL
- locked_until — timestamp with time zone — NOT NULL
- github_issue_id — bigint
- github_issue_node_id — "text"
- github_issue_snapshot — "jsonb"
- github_project_item_node_id — "text"
- pilo_issue_id — bigint — Foreign key → pilo_issues.id
- response_body — "jsonb"
- last_error_code — "text"
- last_error_message — "text"
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
boards
- id — bigint — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id
- status_field_id — "uuid" — Foreign key → github_project_v2_fields.id
- name — character varying(255) — NOT NULL
- last_sync_status — "public"."github_sync_status"
- last_synced_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
calendar_events
- id — bigint — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- title — character varying(255) — NOT NULL
- description — "text"
- color — character varying(20) — NOT NULL
- is_all_day — boolean — NOT NULL
- start_date — "date" — NOT NULL
- end_date — "date" — NOT NULL
- start_time — time without time zone
- end_time — time without time zone
- created_by — "uuid" — Foreign key — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
canvas
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- title — "text" — NOT NULL
- board_type — "text" — NOT NULL
- zoom — double precision — NOT NULL
- viewport_x — double precision — NOT NULL
- viewport_y — double precision — NOT NULL
- created_by — "uuid" — Foreign key
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- latest_op_seq — bigint — NOT NULL — Last committed canvas_shape_operations.op_seq for this canvas. Writers lock the canvas row and increment this value in…
- engine_type — "text" — NOT NULL — 'Canvas rendering/sync engine. classic uses the existing API batch/operation log flow
- engine_version — integer — NOT NULL — Version of the Canvas engine implementation used by this canvas.
- source_canvas_id — "uuid" — Foreign key → canvas.id — When a user starts a new engine version from an existing canvas, this points to the source canvas. Existing shapes are…
canvas_agent_drafts
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → canvas_agent_runs.id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas_agent_runs.canvas_id — NOT NULL
- created_by_user_id — "uuid" — Foreign key — NOT NULL
- status — "text" — NOT NULL
- draft_spec_json — "jsonb" — NOT NULL — Validated CanvasDraftSpec only. Do not store raw tldraw shape payloads here.
- applied_shape_ids — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- applied_at — timestamp with time zone
- expires_at — timestamp with time zone — NOT NULL
canvas_agent_runs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key → canvas.workspace_id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- requested_by_user_id — "uuid" — Foreign key — NOT NULL
- parent_agent_run_id — "uuid" — Foreign key → agent_runs.id — Optional generic Agent run that delegated work to Canvas AI.
- source — "text" — NOT NULL — Canvas chat or a generic Agent delegation. Both sources are limited to Canvas actions and cannot access Calendar, Issue…
- status — "text" — NOT NULL
- prompt — "text" — NOT NULL
- context_json — "jsonb" — NOT NULL — Bounded request context such as selected shape ids and viewport. Do not store raw Canvas snapshots.
- canvas_revision — bigint — Canvas latest_op_seq observed when the run started. Used to detect stale draft inputs before applying a draft.
- result_summary — "text"
- result_json — "jsonb" — NOT NULL
- client_request_id — "text"
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- completed_at — timestamp with time zone
- expires_at — timestamp with time zone — NOT NULL
canvas_agent_shape_embedding_jobs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key → canvas.workspace_id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- shape_id — "text" — Foreign key → canvas_freeform_shapes.id — NOT NULL
- operation — "text" — NOT NULL
- expected_shape_revision — bigint — NOT NULL
- expected_source_text_hash — "text" — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- error_code — "text"
- error_message — "text"
- claimed_at — timestamp with time zone
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
canvas_agent_shape_embeddings
- shape_id — "text" — Foreign key → canvas_freeform_shapes.id — NOT NULL
- workspace_id — "uuid" — Foreign key → canvas.workspace_id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- shape_revision — bigint — NOT NULL
- source_text_hash — "text" — NOT NULL
- embedding — "extensions"."vector"(384) — NOT NULL
- embedding_model — "text" — NOT NULL
- embedding_version — "text" — NOT NULL
- indexed_at — timestamp with time zone — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
canvas_agent_steps
- id — "uuid" — Primary key — NOT NULL
- run_id — "uuid" — Foreign key → canvas_agent_runs.id — NOT NULL
- step_order — integer — NOT NULL
- action_name — "text" — NOT NULL
- status — "text" — NOT NULL
- input_json — "jsonb" — NOT NULL
- output_json — "jsonb" — NOT NULL
- resource_refs — "jsonb" — NOT NULL
- model_name — "text"
- input_tokens — integer
- output_tokens — integer
- error_code — "text"
- error_message — "text"
- started_at — timestamp with time zone
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
canvas_freeform_shapes
- id — "text" — Primary key — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- shape_type — "text" — NOT NULL
- title — "text"
- text_content — "text"
- x — double precision — NOT NULL
- y — double precision — NOT NULL
- width — double precision
- height — double precision
- rotation — double precision — NOT NULL
- z_index — integer — NOT NULL
- raw_shape — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- deleted_at — timestamp with time zone
- content_hash — "text" — NOT NULL
- revision — bigint — NOT NULL
- max_x — double precision
- max_y — double precision
- parent_shape_id — "text" — Immediate parent shape id for frame-scoped Canvas lazy loading. Null means the shape is top-level on the canvas.
canvas_shape_operations
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- shape_id — "text" — NOT NULL — Client-generated shape id. Not a foreign key so operation history can outlive shape cleanup.
- actor_user_id — "uuid" — Foreign key — NOT NULL
- operation_type — "text" — NOT NULL
- op_seq — bigint — NOT NULL
- client_operation_id — "text" — NOT NULL — 'Operation idempotency key. Realtime clients should provide a stable value
- base_revision — bigint
- result_revision — bigint — NOT NULL
- content_hash — "text" — NOT NULL
- payload — "jsonb" — NOT NULL — 'MVP snapshot payload. create/update store the latest rawShape snapshot
- created_at — timestamp with time zone — NOT NULL
canvas_sync_documents
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key → canvas.workspace_id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- provider_type — "text" — NOT NULL — Sync provider implementation for this document. Currently only tldraw_sync is supported.
- snapshot — "jsonb" — Optional persisted document snapshot for sync providers. Realtime server may keep this null until snapshot persistence…
- version — bigint — NOT NULL — Monotonic application-level version for sync snapshot metadata.
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
canvas_user_states
- id — "uuid" — Primary key — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- user_id — "uuid" — Foreign key — NOT NULL
- entered_at — timestamp with time zone — NOT NULL
- left_at — timestamp with time zone
- last_seen_at — timestamp with time zone — Last activity timestamp for Canvas presence/session bookkeeping. Cursor and selection are realtime-only and are not sto…
document_edit_sessions
- id — "uuid" — Primary key — NOT NULL
- document_id — "uuid" — Foreign key → documents.id — NOT NULL
- workspace_id — "uuid" — Foreign key → documents.workspace_id — NOT NULL
- actor_user_id — "uuid" — Foreign key
- first_update_sequence — bigint
- last_update_sequence — bigint
- base_version — bigint — NOT NULL
- closed_version — bigint
- closed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
document_snapshots
- id — "uuid" — Primary key — NOT NULL
- document_id — "uuid" — Foreign key → documents.id — NOT NULL
- workspace_id — "uuid" — Foreign key → documents.workspace_id — NOT NULL
- version — bigint — NOT NULL
- yjs_state — "bytea" — NOT NULL
- content_json — "jsonb" — NOT NULL
- plain_text — "text" — NOT NULL
- source_update_sequence — bigint — NOT NULL
- created_at — timestamp with time zone — NOT NULL
document_yjs_updates
- id — "uuid" — Primary key — NOT NULL
- document_id — "uuid" — Foreign key → document_edit_sessions.document_id — NOT NULL
- workspace_id — "uuid" — Foreign key → document_edit_sessions.workspace_id — NOT NULL
- update_sequence — bigint — NOT NULL
- client_update_id — "text" — NOT NULL
- edit_session_id — "uuid" — Foreign key → document_edit_sessions.id
- actor_user_id — "uuid" — Foreign key
- yjs_update — "bytea" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
documents
- id — "uuid" — Foreign key → document_snapshots.document_id — NOT NULL
- drive_item_id — "uuid" — Foreign key → drive_items.id — NOT NULL
- workspace_id — "uuid" — Foreign key → document_snapshots.workspace_id — NOT NULL
- current_version — bigint — NOT NULL
- latest_snapshot_id — "uuid" — Foreign key → document_snapshots.id
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- deleted_at — timestamp with time zone
drive_items
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- parent_id — "uuid" — Foreign key → drive_items.id
- item_type — "text" — NOT NULL
- name — "text" — NOT NULL
- object_key — "text"
- mime_type — "text"
- size_bytes — bigint
- upload_status — "text"
- created_by_user_id — "uuid" — Foreign key — NOT NULL
- updated_by_user_id — "uuid" — Foreign key
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- deleted_at — timestamp with time zone
drive_uploads
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- drive_item_id — "uuid" — Foreign key → drive_items.id — NOT NULL
- object_key — "text" — NOT NULL
- status — "text" — NOT NULL
- expected_size_bytes — bigint — NOT NULL
- expected_mime_type — "text" — NOT NULL
- expires_at — timestamp with time zone — NOT NULL
- completed_at — timestamp with time zone
- created_by_user_id — "uuid" — Foreign key — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
file_review_decisions
- id — "uuid" — Primary key — NOT NULL
- review_file_id — "uuid" — Foreign key → review_files.id — NOT NULL
- reviewed_by_user_id — "uuid" — Foreign key — NOT NULL
- status — character varying(30) — NOT NULL
- comment — "text"
- reviewed_at — timestamp with time zone — NOT NULL
github_callback_states
- id — "uuid" — Primary key — NOT NULL
- flow — "text" — NOT NULL
- state_nonce — "text" — NOT NULL
- user_id — "uuid" — Foreign key — NOT NULL
- workspace_id — "uuid" — Foreign key
- return_url — "text"
- binding_token_hash — "text" — NOT NULL
- expires_at — timestamp with time zone — NOT NULL
- consumed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_installations
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- github_installation_id — bigint — NOT NULL
- account_login — "text" — NOT NULL
- account_type — "public"."github_account_type" — NOT NULL
- repository_selection — "text"
- permissions — "jsonb" — NOT NULL
- installed_by_user_id — "uuid" — Foreign key
- installed_at — timestamp with time zone
- suspended_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_issues
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id — NOT NULL
- github_issue_id — bigint — NOT NULL
- github_node_id — "text" — NOT NULL
- issue_number — integer — NOT NULL
- title — "text" — NOT NULL
- body — "text"
- state — "public"."github_issue_state" — NOT NULL
- state_reason — "text"
- author_login — "text"
- author_avatar_url — "text"
- html_url — "text" — NOT NULL
- labels — "jsonb" — NOT NULL
- assignees — "jsonb" — NOT NULL
- milestone — "jsonb"
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- github_closed_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_oauth_connections
- id — "uuid" — Primary key — NOT NULL
- user_id — "uuid" — Foreign key — NOT NULL
- purpose — "text" — NOT NULL
- github_user_id — bigint — NOT NULL
- github_login — character varying(255) — NOT NULL
- access_token_encrypted — "text"
- token_scope — "text"
- connected_at — timestamp with time zone — NOT NULL
- revoked_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_field_options
- id — "uuid" — Primary key — NOT NULL
- field_id — "uuid" — Foreign key → github_project_v2_fields.id — NOT NULL
- github_option_id — "text" — NOT NULL
- option_name — "text" — NOT NULL
- normalized_name — "text" — NOT NULL
- color — "text"
- description — "text"
- position — integer
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_fields
- id — "uuid" — Primary key — NOT NULL
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id — NOT NULL
- github_field_node_id — "text" — NOT NULL
- field_name — "text" — NOT NULL
- data_type — "text" — NOT NULL
- is_status_field — boolean — NOT NULL
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_item_field_values
- id — "uuid" — Primary key — NOT NULL
- project_item_id — "uuid" — Foreign key → github_project_v2_items.id — NOT NULL
- field_id — "uuid" — Foreign key → github_project_v2_fields.id
- github_field_value_node_id — "text"
- field_name — "text" — NOT NULL
- field_data_type — "text"
- text_value — "text"
- number_value — numeric
- date_value — "date"
- single_select_option_id — "text"
- single_select_name — "text"
- iteration_id — "text"
- iteration_title — "text"
- raw — "jsonb" — NOT NULL
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_items
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id — NOT NULL
- github_project_item_node_id — "text" — NOT NULL
- github_project_item_full_database_id — bigint
- content_type — "public"."github_project_v2_item_content_type" — NOT NULL
- issue_id — "uuid" — Foreign key → github_issues.id
- pull_request_id — "uuid" — Foreign key → github_pull_requests.id
- is_archived — boolean — NOT NULL
- status_field_id — "uuid" — Foreign key → github_project_v2_fields.id
- status_option_id — "uuid" — Foreign key → github_project_v2_field_options.id
- status_option_github_id — "text"
- status_name — "text"
- status_normalized_name — "text"
- position — integer
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_polling_schedules
- repository_id — "uuid" — Foreign key → github_project_v2_selections.repository_id — NOT NULL
- project_v2_id — "uuid" — Foreign key → github_project_v2_selections.project_v2_id — NOT NULL
- requested_by_user_id — "uuid" — Foreign key — NOT NULL
- next_poll_at — timestamp with time zone — NOT NULL
- active_sync_run_id — "uuid" — Foreign key → github_sync_runs.id
- lease_owner — "text"
- lease_expires_at — timestamp with time zone
- failure_count — integer — NOT NULL
- last_error — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_project_v2_repositories
- id — "uuid" — Primary key — NOT NULL
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id — NOT NULL
- created_at — timestamp with time zone — NOT NULL
github_project_v2_selections
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id — NOT NULL
- installation_id — "uuid" — Foreign key → github_installations.id — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_projects_v2
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- installation_id — "uuid" — Foreign key → github_installations.id — NOT NULL
- github_project_node_id — "text" — NOT NULL
- github_project_full_database_id — bigint
- owner_login — "text" — NOT NULL
- owner_type — "public"."github_project_v2_owner_type" — NOT NULL
- project_number — integer — NOT NULL
- title — "text" — NOT NULL
- short_description — "text"
- readme — "text"
- url — "text" — NOT NULL
- resource_path — "text"
- public — boolean — NOT NULL
- closed — boolean — NOT NULL
- template — boolean — NOT NULL
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- github_closed_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_pull_requests
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id — NOT NULL
- github_pull_request_id — bigint
- github_node_id — "text"
- pr_number — integer — NOT NULL
- title — "text" — NOT NULL
- body — "text"
- author_login — "text"
- author_avatar_url — "text"
- head_branch — "text"
- base_branch — "text"
- changed_files_count — integer — NOT NULL
- additions — integer — NOT NULL
- deletions — integer — NOT NULL
- commits_count — integer — NOT NULL
- comments_count — integer — NOT NULL
- review_comments_count — integer — NOT NULL
- html_url — "text" — NOT NULL
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- github_closed_at — timestamp with time zone
- merged_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_repositories
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- installation_id — "uuid" — Foreign key → github_installations.id
- github_repository_id — bigint
- github_node_id — "text"
- owner_login — "text" — NOT NULL
- name — "text" — NOT NULL
- full_name — "text" — NOT NULL
- private — boolean — NOT NULL
- archived — boolean — NOT NULL
- default_branch — "text"
- html_url — "text" — NOT NULL
- connected_by_user_id — "uuid" — Foreign key
- connected_at — timestamp with time zone — NOT NULL
- github_created_at — timestamp with time zone
- github_updated_at — timestamp with time zone
- pushed_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
github_sync_jobs
- id — "uuid" — Primary key — NOT NULL
- sync_run_id — "uuid" — Foreign key → github_sync_runs.id — NOT NULL
- requested_by_user_id — "uuid" — Foreign key — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- lease_owner — "text"
- lease_expires_at — timestamp with time zone
- last_error — "text"
- created_at — timestamp with time zone — NOT NULL
- started_at — timestamp with time zone
- finished_at — timestamp with time zone
- lease_generation — bigint — NOT NULL
github_sync_runs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- installation_id — "uuid" — Foreign key → github_installations.id
- repository_id — "uuid" — Foreign key → github_repositories.id
- project_v2_id — "uuid" — Foreign key → github_projects_v2.id
- target — "public"."github_sync_target" — NOT NULL
- status — "public"."github_sync_status" — NOT NULL
- started_at — timestamp with time zone — NOT NULL
- finished_at — timestamp with time zone
- fetched_count — integer — NOT NULL
- created_count — integer — NOT NULL
- updated_count — integer — NOT NULL
- skipped_count — integer — NOT NULL
- error_message — "text"
- cursor — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
github_webhook_deliveries
- id — "uuid" — Primary key — NOT NULL
- delivery_id — "text" — NOT NULL
- event_name — "text" — NOT NULL
- status — "text" — NOT NULL
- received_at — timestamp with time zone — NOT NULL
- processed_at — timestamp with time zone
- error_message — "text"
- action — "text"
- github_installation_id — bigint
- project_v2_node_id — "text"
- project_item_node_id — "text"
- lease_owner — "text"
- lease_expires_at — timestamp with time zone
- attempt_count — integer — NOT NULL
livekit_webhook_deliveries
- id — "uuid" — Primary key — NOT NULL
- delivery_id — "text" — NOT NULL
- event_name — "text" — NOT NULL
- room_name — "text"
- participant_identity — "text"
- status — "text" — NOT NULL
- received_at — timestamp with time zone — NOT NULL
- error_message — "text"
meeting_participants
- id — uuid — Primary key — NOT NULL
- meeting_id — uuid — Foreign key → meetings.id — NOT NULL
- user_id — uuid — NOT NULL
- livekit_identity — varchar(255) — NOT NULL
- joined_at — timestamptz — NOT NULL
- left_at — timestamptz
- created_at — timestamptz — NOT NULL
meeting_recording_purge_jobs
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- meeting_id — "uuid" — Foreign key — NOT NULL
- recording_id — "uuid" — Foreign key — NOT NULL
- audio_file_key — "text" — NOT NULL
- scheduled_at — timestamp with time zone — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- next_attempt_at — timestamp with time zone — NOT NULL
- claim_token — "uuid"
- claimed_at — timestamp with time zone
- deleted_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
meeting_recordings
- id — uuid — Primary key — NOT NULL
- meeting_id — uuid — Foreign key → meetings.id — NOT NULL
- livekit_egress_id — varchar(255) — NOT NULL
- status — meeting_recording_status — NOT NULL
- audio_file_url — text
- audio_file_key — text
- duration_sec — integer
- file_size_bytes — bigint
- started_at — timestamptz — NOT NULL
- ended_at — timestamptz
- error_message — text
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
meeting_report_action_item_deliveries
- id — "uuid" — Primary key — NOT NULL
- action_item_id — "uuid" — Foreign key → meeting_report_action_items.id — NOT NULL
- delivery_type — "text" — NOT NULL
- status — "text" — NOT NULL
- calendar_event_id — bigint — Foreign key → calendar_events.id
- pilo_issue_id — bigint — Foreign key → pilo_issues.id
- requested_by_user_id — "uuid" — Foreign key
- draft_json — "jsonb" — NOT NULL
- idempotency_key — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- last_error_code — "text"
- claim_token — "uuid"
- locked_until — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- target_resource_id — "text" — Immutable delivered target ID snapshot. The live FK can become null when Calendar or Board deletes the target.
- last_attempted_by_user_id — "uuid" — Foreign key — Workspace member that most recently claimed this delivery attempt. The original requester remains requested_by_user_id.
- last_attempted_at — timestamp with time zone — When the most recent delivery attempt was claimed.
meeting_report_action_items
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- source_index — integer — NOT NULL
- title — "text" — NOT NULL
- description — "text" — NOT NULL
- priority — "text" — NOT NULL
- assignee_user_id — "uuid" — Foreign key
- status — "text" — NOT NULL
- updated_by_user_id — "uuid" — Foreign key
- approved_by_user_id — "uuid" — Foreign key
- approved_at — timestamp with time zone
- dismissed_by_user_id — "uuid" — Foreign key
- dismissed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- calendar_event_id — bigint — Foreign key → calendar_events.id
- calendar_event_linked_by_user_id — "uuid" — Foreign key
- calendar_event_linked_at — timestamp with time zone
meeting_report_activity_evidence
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- activity_log_id — "uuid" — Foreign key → activity_logs.id — NOT NULL
- source_index — integer — NOT NULL
- occurred_at — timestamp with time zone — NOT NULL
- action — "public"."activity_log_action" — NOT NULL
- summary — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
meeting_report_activity_evidence_references
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key → meeting_report_activity_evidence.meeting_report_id — NOT NULL
- source_type — "text" — NOT NULL
- source_index — integer — NOT NULL
- activity_evidence_id — "uuid" — Foreign key → meeting_report_activity_evidence.id — NOT NULL
- created_at — timestamp with time zone — NOT NULL
meeting_report_decision_items
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- source_index — integer — NOT NULL
- text — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
meeting_report_evidence
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- source_type — "text" — NOT NULL
- source_index — integer — NOT NULL
- transcript_segment_id — "uuid" — Foreign key → meeting_report_transcript_segments.id — NOT NULL
- created_at — timestamp with time zone — NOT NULL
meeting_report_outbox
- id — "uuid" — Primary key — NOT NULL
- report_id — "uuid" — Foreign key — NOT NULL
- meeting_id — "uuid" — Foreign key — NOT NULL
- recording_id — "uuid" — Foreign key — NOT NULL
- audio_file_key — "text" — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- next_attempt_at — timestamp with time zone — NOT NULL
- claim_token — "uuid"
- claimed_at — timestamp with time zone
- delivered_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
meeting_report_transcript_chunks
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- chunk_index — integer — NOT NULL
- start_segment_index — integer — NOT NULL
- end_segment_index — integer — NOT NULL
- started_at_ms — integer — NOT NULL
- ended_at_ms — integer — NOT NULL
- content — "text" — NOT NULL
- content_hash — "text" — NOT NULL
- transcript_hash — "text" — NOT NULL
- embedding — "extensions"."vector"(1536)
- embedding_model — "text"
- embedding_version — "text"
- indexed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
meeting_report_transcript_embedding_jobs
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- transcript_hash — "text" — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- locked_at — timestamp with time zone
- completed_at — timestamp with time zone
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
meeting_report_transcript_segments
- id — "uuid" — Primary key — NOT NULL
- meeting_report_id — "uuid" — Foreign key — NOT NULL
- segment_index — integer — NOT NULL
- started_at_ms — integer — NOT NULL
- ended_at_ms — integer — NOT NULL
- speaker_label — "text"
- text — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
meeting_reports
- id — uuid — Primary key — NOT NULL
- meeting_id — uuid — Foreign key → meetings.id — NOT NULL
- recording_id — uuid — Foreign key → meeting_recordings.id — NOT NULL
- status — meeting_report_status — NOT NULL
- failed_step — meeting_report_failed_step
- error_message — text
- transcript_text — text
- summary — text
- discussion_points — text
- decisions — text
- action_item_candidates — jsonb
- retry_count — integer — NOT NULL
- created_at — timestamptz — NOT NULL
- updated_at — timestamptz — NOT NULL
meeting_rooms
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- room_key — character varying(100) — NOT NULL
- name — character varying(100) — NOT NULL
- created_by_id — "uuid" — Foreign key
- archived_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
meetings
- id — uuid — Primary key — NOT NULL
- room_key — varchar(100) — NOT NULL
- livekit_room_name — varchar(255) — NOT NULL
- created_by_id — uuid — NOT NULL
- started_at — timestamptz — NOT NULL
- ended_at — timestamptz
- created_at — timestamptz — NOT NULL
pilo_issues
- id — bigint — Primary key — NOT NULL
- board_id — bigint — Foreign key → board_columns.board_id — NOT NULL
- column_id — bigint — Foreign key → board_columns.id — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- repository_id — "uuid" — Foreign key → github_repositories.id
- github_issue_id — "uuid" — Foreign key → github_issues.id
- project_item_id — "uuid" — Foreign key → github_project_v2_items.id
- github_issue_node_id — "text"
- github_project_item_node_id — "text"
- github_issue_number — integer
- issue_number — character varying(100) — NOT NULL
- title — character varying(255) — NOT NULL
- body — "text"
- html_url — "text"
- state — "public"."github_issue_state"
- labels — "jsonb" — NOT NULL
- assignees — "jsonb" — NOT NULL
- milestone — "jsonb"
- position — integer — NOT NULL
- github_updated_at — timestamp with time zone
- last_synced_at — timestamp with time zone
- raw — "jsonb" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
pr_review_analysis_jobs
- id — "uuid" — Primary key — NOT NULL
- review_session_id — "uuid" — Foreign key → pr_review_sessions.id — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- head_sha — "text" — NOT NULL
- status — "text" — NOT NULL
- publish_attempt_count — integer — NOT NULL
- next_publish_attempt_at — timestamp with time zone — NOT NULL
- publish_claim_token — "uuid"
- publish_claimed_at — timestamp with time zone
- published_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
pr_review_conflict_drafts
- review_file_id — "uuid" — Foreign key → review_files.id — NOT NULL
- source_head_blob_sha — "text" — NOT NULL
- resolved_content — "text" — NOT NULL
- draft_version — integer — NOT NULL
- updated_by_user_id — "uuid" — Foreign key — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- resolution_state — "jsonb" — NOT NULL — Durable hunk selection and direct-edit state. Existing drafts default to direct-edit to avoid overwriting unknown user…
pr_review_room_files
- id — "uuid" — Primary key — NOT NULL
- room_id — "uuid" — Foreign key → pr_review_rooms.id — NOT NULL
- current_file_path — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
pr_review_rooms
- id — "uuid" — Foreign key → pr_review_sessions.room_id — NOT NULL
- workspace_id — "uuid" — Foreign key → github_pull_requests.workspace_id — NOT NULL
- pull_request_id — "uuid" — Foreign key → github_pull_requests.id — NOT NULL
- canvas_id — "uuid" — Foreign key → canvas.id — NOT NULL
- current_session_id — "uuid" — Foreign key → pr_review_sessions.id — Last successfully persisted review revision. An analyzing revision does not replace it.
- status — "text" — NOT NULL
- completion_reason — "text"
- created_by_user_id — "uuid" — Foreign key
- completed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
pr_review_sessions
- id — "uuid" — Primary key — NOT NULL
- pull_request_id — "uuid" — Foreign key → github_pull_requests.id — NOT NULL
- created_by_user_id — "uuid" — Foreign key
- head_sha — "text" — NOT NULL
- status — character varying(30) — NOT NULL
- pr_purpose — "text"
- change_summary — "jsonb" — NOT NULL
- recommended_review_order — "text"
- caution_points — "jsonb" — NOT NULL
- reviewed_count — integer — NOT NULL
- total_file_count — integer — NOT NULL
- conflict_status — character varying(30) — NOT NULL
- conflict_checked_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- analysis_error_code — "text"
- analysis_error_message — "text"
- room_id — "uuid" — Foreign key → pr_review_rooms.id — NOT NULL — Shared PR Review room that owns this immutable head-SHA review revision.
review_files
- id — "uuid" — Primary key — NOT NULL
- session_id — "uuid" — Foreign key → pr_review_sessions.id — NOT NULL
- file_path — "text" — NOT NULL
- previous_file_path — "text"
- file_name — character varying(255) — NOT NULL
- file_status — character varying(30) — NOT NULL
- additions — integer — NOT NULL
- deletions — integer — NOT NULL
- is_binary — boolean — NOT NULL
- is_large_diff — boolean — NOT NULL
- github_file_url — "text"
- file_role — "text"
- change_reason — "text"
- change_summary — "text"
- review_points — "jsonb" — NOT NULL
- current_status — character varying(30) — NOT NULL
- comment — "text"
- reviewed_by_user_id — "uuid" — Foreign key
- reviewed_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- risk_level — character varying(20) — NOT NULL
- role_type — "text" — NOT NULL
- room_id — "uuid" — Foreign key → pr_review_sessions.room_id — NOT NULL
- room_file_id — "uuid" — Foreign key → pr_review_room_files.id — NOT NULL
- head_blob_sha — "text"
- carried_from_decision_id — "uuid" — Foreign key → file_review_decisions.id — Decision provenance when an unchanged file carries a previous revision decision.
- decision_version — integer — NOT NULL — Monotonic optimistic concurrency version for the current file review decision.
review_flow_files
- id — "uuid" — Primary key — NOT NULL
- flow_id — "uuid" — Foreign key → review_flows.id — NOT NULL
- review_file_id — "uuid" — Foreign key → review_files.id — NOT NULL
- workflow_order — integer — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- session_id — "uuid" — Foreign key → pr_review_sessions.id — NOT NULL
review_flow_relations
- id — "uuid" — Primary key — NOT NULL
- session_id — "uuid" — Foreign key → review_flow_files.session_id — NOT NULL
- flow_id — "uuid" — Foreign key → review_flow_files.flow_id — NOT NULL
- from_review_flow_file_id — "uuid" — Foreign key → review_flow_files.id — NOT NULL
- to_review_flow_file_id — "uuid" — Foreign key → review_flow_files.id — NOT NULL
- relation_type — "text" — NOT NULL
- source — "text" — NOT NULL
- confidence — smallint — NOT NULL
- reason — "text" — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
review_flows
- id — "uuid" — Primary key — NOT NULL
- session_id — "uuid" — Foreign key → pr_review_sessions.id — NOT NULL
- title — character varying(255) — NOT NULL
- description — "text"
- sort_order — integer — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
review_submissions
- id — "uuid" — Primary key — NOT NULL
- session_id — "uuid" — Foreign key → pr_review_sessions.id — NOT NULL
- submitted_by_user_id — "uuid" — Foreign key — NOT NULL
- submitted_by_github_login — character varying(255) — NOT NULL
- submit_type — character varying(30) — NOT NULL
- review_body — "text" — NOT NULL
- review_result_summary — "text"
- file_review_results — "jsonb" — NOT NULL
- github_submit_status — character varying(30) — NOT NULL
- github_review_id — character varying(255)
- github_review_url — "text"
- error_message — "text"
- submitted_at — timestamp with time zone
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
sql_erd_session_creation_audit
- id — "uuid" — Primary key — NOT NULL
- session_id — "uuid" — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- write_protocol — "text" — NOT NULL
- session_created_at — timestamp with time zone — NOT NULL
- observed_at — timestamp with time zone — NOT NULL
sql_erd_session_operation_outbox
- id — "uuid" — Primary key — NOT NULL
- operation_id — "uuid" — Foreign key → sql_erd_session_operations.id — NOT NULL
- status — "text" — NOT NULL
- attempt_count — integer — NOT NULL
- next_attempt_at — timestamp with time zone — NOT NULL
- claim_token — "uuid"
- claimed_at — timestamp with time zone
- delivered_at — timestamp with time zone
- error_code — "text"
- error_message — "text"
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
sql_erd_session_operations
- id — "uuid" — Primary key — NOT NULL
- workspace_id — "uuid" — Foreign key — NOT NULL
- session_id — "uuid" — Foreign key → sql_erd_session_source_snapshots.session_id — NOT NULL
- actor_user_id — "uuid" — Foreign key — NOT NULL
- operation_type — "text" — NOT NULL
- op_seq — bigint — NOT NULL
- client_operation_id — "text" — NOT NULL — Stable client idempotency key for retried operation requests from one actor.
- base_revision — integer — NOT NULL
- applied_on_revision — integer — NOT NULL
- result_revision — integer — NOT NULL
- payload — "jsonb" — NOT NULL — Validated layout_patch command payload. Add, update, and delete commands are explicit so an empty value is never interp…
- created_at — timestamp with time zone — NOT NULL
- source_snapshot_id — "uuid" — Foreign key → sql_erd_session_source_snapshots.id — Session-scoped immutable source snapshot reference. Required for source_snapshot and NULL for layout_patch.
- request_fingerprint — "text" — SHA-256 fingerprint of normalized source publish input. Used to reject mismatched idempotency-key reuse.
and 8 more tables