Database Architecture

Prisma Schema Visualizer

Paste schema.prisma: models, relation arrows, enums, @@index, onDelete, and a warning when a foreign key has no index.

Short note in the blog

Schema.prismaPrisma 7
Loading...

Checks

Relation without an index

The fields of this @relation are not a leading @@index, @@unique, or @@id, and they are not marked @unique or @id.

Comment.post

Relations

Post.author
User.id
onDelete: Cascadeindexed
authorId
Comment.post
Post.id
onDelete: Restrictno index
postId

Enums

Role
ADMIN · EDITOR

Models

User
idString
emailString
roleRole
postsPost[]
createdAtDateTime
Post
idInt
titleString
authorIdString
authorUser · Cascade
@@index(authorId)
Comment
idInt
postIdInt
postPost · Restrict

How does Prisma Optimizer work?

The tool reads whole model and enum blocks instead of stopping at the first brace. It draws each @relation, shows onDelete and @@index, and warns when fields are not covered by an index, @id, or @unique.