Studio is the top-level tenant. Everything else hangs off it.
Entities
- Studio — the tenant boundary. All data is scoped to a studio.
- StudioMember — links a
Userto aStudiowith aMemberRole(OWNER | ADMIN | MEMBER). - Client → Project — a studio’s clients and the projects under them.
- Phase / Task / Pinboard / Schedule — belong to a project.
- Product — lives in a studio-scoped library and can be pinned to pinboards or added to schedules.
When changing
apps/server/prisma/schema.prisma, always create a corresponding
migration file with prisma migrate dev --name <description>. Never use
prisma db push against production — Railway only applies changes via
prisma migrate deploy, so a missing migration causes runtime errors.