Database Schema & API Route Groups
Generated from src/data/generated/schema.json.
Top-Level API Route Groups
Section titled “Top-Level API Route Groups”/api/account/api/attachments/api/auth/api/boards/api/columns/api/commands/api/events/api/health/api/links/api/notifications/api/orgs/api/projects/api/search/api/setup/api/system/api/teams/api/tickets/api/users/api/workspace
PostgreSQL Tables
Section titled “PostgreSQL Tables”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
email |
text |
No | UNIQUE |
name |
text |
No | — |
password_hash |
text |
No | — |
must_change_password |
boolean |
No | — |
is_setup_admin |
boolean |
No | — |
is_deactivated |
boolean |
No | — |
last_login_at |
timestamp |
Yes | — |
created_at |
timestamp |
No | — |
sessions
Section titled “sessions”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
text |
No | PRIMARY KEY |
user_id |
uuid |
No | REFERENCES users.id |
csrf_token |
text |
No | — |
expires_at |
timestamp |
No | — |
last_active_at |
timestamp |
No | — |
created_at |
timestamp |
No | — |
| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
name |
text |
No | — |
slug |
text |
No | UNIQUE |
description |
text |
No | — |
created_by_id |
uuid |
Yes | REFERENCES users.id |
created_at |
timestamp |
No | — |
setup_state
Section titled “setup_state”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
text |
No | PRIMARY KEY |
admin_user_id |
uuid |
Yes | REFERENCES users.id |
org_id |
uuid |
Yes | REFERENCES orgs.id |
current_step |
integer |
No | — |
completed_steps |
jsonb |
No | — |
skipped_steps |
jsonb |
No | — |
draft_data |
jsonb |
No | — |
is_completed |
boolean |
No | — |
completed_at |
timestamp |
Yes | — |
updated_at |
timestamp |
No | — |
setup_token
Section titled “setup_token”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
text |
No | PRIMARY KEY |
ciphertext |
text |
Yes | — |
iv |
text |
Yes | — |
auth_tag |
text |
Yes | — |
key_version |
integer |
No | — |
created_at |
timestamp |
No | — |
confirmed_at |
timestamp |
Yes | — |
consumed_at |
timestamp |
Yes | — |
setup_credentials
Section titled “setup_credentials”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
user_id |
uuid |
No | PRIMARY KEY, REFERENCES users.id |
ciphertext |
text |
No | — |
iv |
text |
No | — |
auth_tag |
text |
No | — |
created_at |
timestamp |
No | — |
org_members
Section titled “org_members”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
user_id |
uuid |
No | REFERENCES users.id |
role |
text |
No | — |
created_at |
timestamp |
No | — |
| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
name |
text |
No | — |
slug |
text |
No | — |
description |
text |
No | — |
created_at |
timestamp |
No | — |
team_members
Section titled “team_members”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
team_id |
uuid |
No | REFERENCES teams.id |
user_id |
uuid |
No | REFERENCES users.id |
role |
text |
No | — |
sub_role |
text |
Yes | — |
created_at |
timestamp |
No | — |
projects
Section titled “projects”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
team_id |
uuid |
No | REFERENCES teams.id |
name |
text |
No | — |
key |
text |
No | — |
description |
text |
No | — |
ticket_counter |
integer |
No | — |
created_at |
timestamp |
No | — |
boards
Section titled “boards”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
team_id |
uuid |
No | REFERENCES teams.id |
project_id |
uuid |
No | REFERENCES projects.id |
name |
text |
No | — |
description |
text |
No | — |
created_at |
timestamp |
No | — |
columns
Section titled “columns”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
board_id |
uuid |
No | REFERENCES boards.id |
name |
text |
No | — |
position |
doublePrecision |
No | — |
wip_limit |
integer |
Yes | — |
color |
text |
No | — |
created_at |
timestamp |
No | — |
tickets
Section titled “tickets”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
team_id |
uuid |
No | REFERENCES teams.id |
project_id |
uuid |
No | REFERENCES projects.id |
board_id |
uuid |
No | REFERENCES boards.id |
column_id |
uuid |
No | REFERENCES columns.id |
number |
integer |
No | — |
key |
text |
No | — |
title |
text |
No | — |
description |
text |
No | — |
priority |
text |
No | — |
labels |
text |
No | — |
labels_text |
text |
No | — |
assignee_id |
uuid |
Yes | REFERENCES users.id |
reporter_id |
uuid |
Yes | REFERENCES users.id |
due_date |
timestamp |
Yes | — |
archived_at |
timestamp |
Yes | — |
position |
integer |
No | — |
created_at |
timestamp |
No | — |
updated_at |
timestamp |
No | — |
search_vector |
tsvector |
Yes | — |
ticket_comments
Section titled “ticket_comments”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
ticket_id |
uuid |
No | REFERENCES tickets.id |
org_id |
uuid |
No | REFERENCES orgs.id |
team_id |
uuid |
No | REFERENCES teams.id |
author_id |
uuid |
No | REFERENCES users.id |
body |
text |
No | — |
created_at |
timestamp |
No | — |
updated_at |
timestamp |
No | — |
search_vector |
tsvector |
Yes | — |
ticket_activities
Section titled “ticket_activities”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
ticket_id |
uuid |
No | REFERENCES tickets.id |
actor_id |
uuid |
Yes | REFERENCES users.id |
action |
text |
No | — |
details |
jsonb |
Yes | — |
created_at |
timestamp |
No | — |
ticket_attachments
Section titled “ticket_attachments”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
ticket_id |
uuid |
No | REFERENCES tickets.id |
org_id |
uuid |
No | REFERENCES orgs.id |
team_id |
uuid |
No | REFERENCES teams.id |
uploader_id |
uuid |
No | REFERENCES users.id |
filename |
text |
No | — |
content_type |
text |
No | — |
size_bytes |
integer |
No | — |
storage_key |
text |
No | — |
extracted_text |
text |
No | — |
created_at |
timestamp |
No | — |
search_vector |
tsvector |
Yes | — |
ticket_links
Section titled “ticket_links”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
ticket_id |
uuid |
No | REFERENCES tickets.id |
created_by_id |
uuid |
No | REFERENCES users.id |
provider |
text |
No | — |
kind |
text |
No | — |
url |
text |
No | — |
title |
text |
No | — |
status |
text |
No | — |
external_ref |
text |
No | — |
created_at |
timestamp |
No | — |
system_settings
Section titled “system_settings”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
key |
text |
No | PRIMARY KEY |
value |
jsonb |
No | — |
updated_by_id |
uuid |
Yes | REFERENCES users.id |
updated_at |
timestamp |
No | — |
domain_events
Section titled “domain_events”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
event_type |
text |
No | — |
aggregate_type |
text |
No | — |
aggregate_id |
uuid |
No | — |
org_id |
uuid |
No | — |
team_id |
uuid |
No | — |
board_id |
uuid |
No | — |
actor_id |
uuid |
Yes | REFERENCES users.id |
idempotency_key |
text |
No | UNIQUE |
metadata |
jsonb |
Yes | — |
created_at |
timestamp |
No | — |
processed_at |
timestamp |
Yes | — |
attempts |
integer |
No | — |
next_attempt_at |
timestamp |
No | — |
last_error |
text |
Yes | — |
dead_lettered_at |
timestamp |
Yes | — |
ticket_watchers
Section titled “ticket_watchers”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
ticket_id |
uuid |
No | REFERENCES tickets.id |
user_id |
uuid |
No | REFERENCES users.id |
source |
text |
No | — |
muted |
boolean |
No | — |
unwatched_at |
timestamp |
Yes | — |
created_at |
timestamp |
No | — |
user_notification_preferences
Section titled “user_notification_preferences”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
user_id |
uuid |
No | PRIMARY KEY, REFERENCES users.id |
in_app_mentions |
boolean |
No | — |
in_app_assignments |
boolean |
No | — |
in_app_watched |
boolean |
No | — |
email_mentions |
text |
No | — |
email_assignments |
text |
No | — |
email_watched |
text |
No | — |
digest_frequency |
text |
No | — |
digest_hour |
integer |
No | — |
digest_day |
integer |
No | — |
auto_watch_creator |
boolean |
No | — |
auto_watch_assignee |
boolean |
No | — |
auto_watch_commenter |
boolean |
No | — |
auto_watch_mentioned |
boolean |
No | — |
presence_enabled |
boolean |
No | — |
last_digest_sent_at |
timestamp |
Yes | — |
updated_at |
timestamp |
No | — |
notifications
Section titled “notifications”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
recipient_id |
uuid |
No | REFERENCES users.id |
type |
text |
No | — |
ticket_id |
uuid |
No | REFERENCES tickets.id |
comment_id |
uuid |
Yes | REFERENCES ticketComments.id |
actor_id |
uuid |
Yes | REFERENCES users.id |
summary |
jsonb |
Yes | — |
dedupe_key |
text |
No | UNIQUE |
group_key |
text |
No | — |
created_at |
timestamp |
No | — |
updated_at |
timestamp |
No | — |
read_at |
timestamp |
Yes | — |
archived_at |
timestamp |
Yes | — |
email_outbox
Section titled “email_outbox”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
recipient_id |
uuid |
No | REFERENCES users.id |
category |
text |
No | — |
ticket_id |
uuid |
Yes | REFERENCES tickets.id |
notification_ids |
jsonb |
No | — |
subject |
text |
No | — |
payload |
jsonb |
Yes | — |
idempotency_key |
text |
No | UNIQUE |
status |
text |
No | — |
attempts |
integer |
No | — |
next_attempt_at |
timestamp |
No | — |
sent_at |
timestamp |
Yes | — |
last_error |
text |
Yes | — |
created_at |
timestamp |
No | — |
webhook_endpoints
Section titled “webhook_endpoints”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
org_id |
uuid |
No | REFERENCES orgs.id |
name |
text |
No | — |
url |
text |
No | — |
format |
text |
No | — |
events |
text |
No | — |
scope_team_ids |
uuid |
No | — |
scope_project_ids |
uuid |
No | — |
scope_board_ids |
uuid |
No | — |
secret_ciphertext |
text |
No | — |
secret_iv |
text |
No | — |
secret_auth_tag |
text |
No | — |
secret_key_version |
integer |
No | — |
enabled |
boolean |
No | — |
consecutive_failures |
integer |
No | — |
disabled_reason |
text |
Yes | — |
disabled_at |
timestamp |
Yes | — |
created_by_id |
uuid |
Yes | REFERENCES users.id |
created_at |
timestamp |
No | — |
updated_at |
timestamp |
No | — |
webhook_deliveries
Section titled “webhook_deliveries”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
uuid |
No | PRIMARY KEY |
endpoint_id |
uuid |
No | REFERENCES webhookEndpoints.id |
domain_event_id |
uuid |
Yes | REFERENCES domainEvents.id |
event_type |
text |
No | — |
idempotency_key |
text |
No | UNIQUE |
payload |
jsonb |
Yes | — |
status |
text |
No | — |
attempts |
integer |
No | — |
next_attempt_at |
timestamp |
No | — |
response_status |
integer |
Yes | — |
duration_ms |
integer |
Yes | — |
last_error |
text |
Yes | — |
delivered_at |
timestamp |
Yes | — |
created_at |
timestamp |
No | — |
worker_health
Section titled “worker_health”| Column | Drizzle Type | Nullable | Constraints / References |
|---|---|---|---|
id |
text |
No | PRIMARY KEY |
worker_id |
text |
No | — |
mode |
text |
No | — |
started_at |
timestamp |
No | — |
last_heartbeat_at |
timestamp |
No | — |
processed_events |
integer |
No | — |
last_error |
text |
Yes | — |
updated_at |
timestamp |
No | — |