Skip to content

Schema: workspaces

Part of the generated database reference.

aiworkspace_comments

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.0.16-01-workspaces
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK aiworkspaces.id
page_id UUID no β€” FK aiworkspace_pages.id
block_id UUID yes β€” β€” β€”
parent_comment_id UUID yes β€” FK aiworkspace_comments.id
author_id UUID no β€” β€” β€”
content TEXT no β€” β€” β€”
resolved BOOLEAN no FALSE β€” β€”
resolved_by UUID yes β€” β€” β€”
resolved_at TIMESTAMPTZ yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

aiworkspace_members

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.0.16-01-workspaces
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK aiworkspaces.id
user_id UUID no β€” β€” β€”
role VARCHAR(50) no 'member' β€” β€”
invited_by UUID yes β€” β€” β€”
joined_at TIMESTAMPTZ no NOW() β€” β€”

aiworkspace_page_versions

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.0.16-01-workspaces
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
page_id UUID no β€” FK aiworkspace_pages.id
version_number INTEGER no β€” β€” β€”
title VARCHAR(500) no β€” β€” β€”
content JSONB no '[]' β€” β€”
change_summary TEXT yes β€” β€” β€”
created_by UUID no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

aiworkspace_pages

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.0.16-01-workspaces
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK aiworkspaces.id
parent_id UUID yes β€” FK aiworkspace_pages.id
title VARCHAR(500) no β€” β€” β€”
icon_type VARCHAR(20) yes β€” β€” β€”
icon_value VARCHAR(100) yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
content JSONB no '[]' β€” β€”
properties JSONB no '{}' β€” β€”
is_template BOOLEAN no FALSE β€” β€”
template_id UUID yes β€” FK aiworkspace_pages.id
is_public BOOLEAN no FALSE β€” β€”
public_edit BOOLEAN no FALSE β€” β€”
position INTEGER no 0 β€” β€”
created_by UUID no β€” β€” β€”
last_edited_by UUID yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

aiworkspaces

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.23-branch-scope-cleanup
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” β€” β€”
bot_id UUID no β€” β€” β€”
name VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
icon_type VARCHAR(20) yes 'emoji' β€” β€”
icon_value VARCHAR(100) yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
settings JSONB no '{}' β€” β€”
created_by UUID no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

user_workspace_tabs

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.81-user-workspace-tabs
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
user_id UUID no β€” PK β€”
tabs JSONB no '[]'::jsonb β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

workspace_comment_reactions

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
comment_id UUID no β€” FK workspace_comments.id
user_id UUID no β€” β€” β€”
emoji VARCHAR(255) no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

workspace_comments

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK workspaces.id
page_id UUID no β€” FK workspace_pages.id
block_id UUID yes β€” β€” β€”
parent_comment_id UUID yes β€” β€” β€”
author_id UUID no β€” β€” β€”
content TEXT no β€” β€” β€”
resolved BOOLEAN no β€” β€” β€”
resolved_by UUID yes β€” β€” β€”
resolved_at TIMESTAMPTZ yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

workspace_members

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK workspaces.id
user_id UUID no β€” β€” β€”
role VARCHAR(255) no β€” β€” β€”
invited_by UUID yes β€” β€” β€”
joined_at TIMESTAMPTZ no β€” β€” β€”

workspace_page_permissions

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
page_id UUID no β€” FK workspace_pages.id
user_id UUID yes β€” β€” β€”
role VARCHAR(255) yes β€” β€” β€”
permission VARCHAR(255) no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

workspace_page_versions

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
page_id UUID no β€” FK workspace_pages.id
version_number INTEGER no β€” β€” β€”
title VARCHAR(255) no β€” β€” β€”
content JSONB no β€” β€” β€”
change_summary TEXT yes β€” β€” β€”
created_by UUID no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

workspace_pages

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
workspace_id UUID no β€” FK workspaces.id
parent_id UUID yes β€” β€” β€”
title VARCHAR(255) no β€” β€” β€”
icon_type VARCHAR(255) yes β€” β€” β€”
icon_value VARCHAR(255) yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
content JSONB no β€” β€” β€”
properties JSONB no β€” β€” β€”
is_template BOOLEAN no β€” β€” β€”
template_id UUID yes β€” β€” β€”
is_public BOOLEAN no FALSE β€” β€”
public_edit BOOLEAN no β€” β€” β€”
position INTEGER no β€” β€” β€”
created_by UUID no β€” β€” β€”
last_edited_by UUID yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

workspace_templates

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
branch_id UUID yes β€” FK branches.id
name VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
category VARCHAR(255) yes β€” β€” β€”
icon_type VARCHAR(255) yes β€” β€” β€”
icon_value VARCHAR(255) yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
content JSONB no β€” β€” β€”
is_system BOOLEAN no β€” β€” β€”
usage_count INTEGER no β€” β€” β€”
created_by UUID yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”

workspaces

  • Domain: workspaces Β· Feature gate: #[cfg(feature = "workspaces")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/workspaces.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
branch_id UUID yes β€” FK branches.id
name VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
icon_type VARCHAR(255) yes β€” β€” β€”
icon_value VARCHAR(255) yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
settings JSONB no β€” β€” β€”
created_by UUID no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”