← All tools

SQL ↔ Prisma ↔ Drizzle Schema Converter

Convert one PostgreSQL table between SQL, Prisma 6–7 native-type syntax and Drizzle pgTable while preserving supported types and constraints.

schema-converterLOCAL WORKSPACE

Enabling local controls…

Input is never executed, stored or uploaded. 32 KiB / 200 columns. Unsupported syntax stops conversion; retain your original schema.

Converted schemas

Convert to inspect all three copyable formats.

Usage and limits

Choose the input dialect, paste one table and convert locally. Compare all three outputs. Limits: 32 KiB, 8,000 tokens and 200 columns. Supports scalar PostgreSQL types, one-column PK/UNIQUE/FK, nullability and constant/now()/gen_random_uuid() defaults.

A primary key or NOT NULL UNIQUE column is required for Prisma. Review snippets before migrations. Supply external Prisma models/reverse relations and Drizzle table bindings. Prisma 8 type aliases, composite/named constraints, indexes, CHECK, arrays, enums, schemas, custom types and arbitrary expressions are rejected. External FK targets use simple identifiers; NoAction actions only.

Sources

How to use this tool

Choose the input dialect, paste one table and convert locally. Compare all three outputs. Limits: 32 KiB, 8,000 tokens and 200 columns. Supports scalar PostgreSQL types, one-column PK/UNIQUE/FK, nullability and constant/now()/gen_random_uuid() defaults.

When not to use it

A primary key or NOT NULL UNIQUE column is required for Prisma. Review snippets before migrations. Supply external Prisma models/reverse relations and Drizzle table bindings. Prisma 8 type aliases, composite/named constraints, indexes, CHECK, arrays, enums, schemas, custom types and arbitrary expressions are rejected. External FK targets use simple identifiers; NoAction actions only.