SQL to Prisma Schema
Convert CREATE TABLE to Prisma schema
Source Input
Processed Output
What is the SQL to Prisma Schema?
Prisma uses its own schema language. This converter maps SQL types (INT → Int, VARCHAR → String, BOOLEAN → Boolean, TIMESTAMP → DateTime) and translates PRIMARY KEY, NOT NULL, DEFAULT, and UNIQUE into @id, required fields, @default, and @unique attributes.
Frequently Asked Questions (FAQ)
Q: Does it handle foreign keys?
Yes, FOREIGN KEY constraints become Prisma relation fields with @relation attributes.
How to Use the SQL to Prisma Schema
- 1Paste your input into the editor above — or start from the preloaded example.
- 2Adjust any options, then click Run to process instantly in your browser.
- 3Review the output panel, then copy, download, or save it as a reusable snippet.