How to use it
- 1Paste your SQL DDL or drop a file onto the input panel.
- 2Adjust the options — the result updates as you type.
- 3Copy the Prisma or download it. Drop several files to convert a batch into one ZIP.
What gets generated
Each table becomes a model named in singular PascalCase, mapped back to the original table with @@map. Columns keep their names; types map to Prisma scalars with native @db attributes where precision matters, such as @db.VarChar(191) or @db.Decimal(10, 2).
Foreign keys become relation fields on both sides — the scalar and @relation field on the child, the list field on the parent — with onDelete carried over. When two foreign keys point at the same table, relations are named so Prisma can tell them apart.
AUTO_INCREMENT, SERIAL and IDENTITY become @default(autoincrement()), CURRENT_TIMESTAMP becomes @default(now()), and ON UPDATE CURRENT_TIMESTAMP becomes @updatedAt.
Questions
How is this different from prisma db pull?
prisma db pull needs a running database and credentials. This works from a .sql file alone, which helps when you only have a dump, when the database is in a network you can't reach, or when you're reviewing a schema before it exists.
Should I run prisma format afterwards?
Yes. The output is valid Prisma schema language; prisma format will align the columns and validate the relations against your Prisma version.
Guides that use this tool
· 6 min read
MySQL to PostgreSQL: the differences that actually break migrations
Migrating from MySQL to PostgreSQL: type mapping, AUTO_INCREMENT and sequences, zero dates, case sensitivity, query rewrites and how to verify the result.