You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Heartbeat and Metric tables have composite primary keys (id, timestamp) for TimescaleDB hypertable support. This diverges from the Prisma schema which shows @id on id only — the migration applies the composite PK directly.
Event
Lifecycle events for instances.
Column
Type
Notes
id
String
PK
instance_id
String
FK → Instance
event_type
EventType
timestamp
DateTime
metadata
Json?
Arbitrary event data
Users & Access Control
User
Column
Type
Notes
id
String
PK
email
String
Unique
name
String
password_hash
String?
Nullable (SSO-only users)
role
UserRole
Default: VIEWER
is_active
Boolean
Default: true
last_login_at
DateTime?
created_at
DateTime
updated_at
DateTime
Team
Column
Type
Notes
id
String
PK
name
String
Unique
description
String?
created_by
String
created_at
DateTime
updated_at
DateTime
TeamMember
Column
Type
Notes
id
String
PK
team_id
String
FK → Team
user_id
String
FK → User
role
TeamMemberRole
joined_at
DateTime
Unique: (team_id, user_id)
ApiKey
Column
Type
Notes
id
String
PK
user_id
String
FK → User
key_hash
String
Unique, SHA-256
name
String
Display name
created_at
DateTime
expires_at
DateTime?
AuditLog
Column
Type
Notes
id
String
PK
user_id
String?
FK → User
team_id
String?
FK → Team
action
AuditAction
resource
String
Resource type
resource_id
String?
metadata
Json?
ip_address
String?
user_agent
String?
timestamp
DateTime
Deployments
DeploymentTemplate
Column
Type
Notes
id
String
PK
name
String
slug
String
Unique
category
String?
description
String?
yaml_content
String
sindri.yaml content
extensions
String[]
provider_recommendations
String[]
is_official
Boolean
Default: false
created_by
String?
created_at
DateTime
updated_at
DateTime
Deployment
Column
Type
Notes
id
String
PK
instance_id
String
FK → Instance
template_id
String?
FK → DeploymentTemplate
config_hash
String?
yaml_content
String
provider
String
region
String
status
DeploymentStatus
initiated_by
String?
started_at
DateTime
completed_at
DateTime?
logs
String?
error
String?
Observability
Log
Column
Type
Notes
id
String
PK
instance_id
String
FK → Instance
level
LogLevel
source
LogSource
message
String
Full-text indexed
metadata
Json?
deployment_id
String?
timestamp
DateTime
Indices: by level, source, (instance_id, timestamp), (instance_id, level), full-text on message
All tables, enums, indexes, and TimescaleDB hypertables are consolidated into a single 20260224000000_init migration — this includes auth tables (Session, Account, Verification), geo columns, LLM usage tracking, the DESTROYED status, and non-unique instance name index
Heartbeat, Metric, and LlmUsageEntry hypertables are created via raw SQL in the migration (not expressible in Prisma schema)
Prisma 7 uses the adapter pattern: @prisma/adapter-pg with PrismaPg({ connectionString })
prisma.config.ts at apps/api/ holds the datasource URL and migration directory