D
DreamLake

DB Schema

Namespace

Top-level owner scope (user or team). Maps to a URL slug like alice. Global scope.

FieldTypeDescription
idObjectIdPrimary key
slugString (unique)URL-friendly identifier
userIdString?User owner reference
teamIdString?Team owner reference
metadataJson?Arbitrary metadata
deletedAtDateTime?Soft delete timestamp

Must have either userId OR teamId (enforced in application logic).

Relations: spaces: Space[]

Indexes: slug (unique), deletedAt, userId, teamId