Microdeck.tools 100% In-Browser
Schema & Code Converter 100% In-Browser

Convert SQL CREATE TABLE to Prisma Schema Online

Instantly transpile raw SQL CREATE TABLE statements into production-ready Prisma schema models with relationships and field mappings.

SQL Dialect:
Target Output:
prisma Output✓ Parsed 1 table (AST transpiler)
model Users {
  id               Int @id @default(autoincrement())
  email            String @unique
  full_name        String?
  age              Int? @default(18)
  is_active        Boolean? @default(true)
  created_at       DateTime? @default(now())

  @@map("users")
}

Did this converter save you time? Completely optional · From $3 — keeps Microdeck fast and free.

ADVERTISEMENT
Privacy-Friendly Sponsor Unit
Contextual tech, developer, & creator tools sponsorship slot. Zero intrusive tracking.

Sample Conversion: SQL DDL → Prisma Schema

Input (SQL DDL)
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  email VARCHAR(255) UNIQUE NOT NULL,
  name VARCHAR(100),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Output (Prisma Schema)
model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  createdAt DateTime @default(now()) @map("created_at")

  @@map("users")
}

Frequently Asked Questions

How does SQL to Prisma conversion handle data types?

SERIAL/BIGSERIAL maps to Int/BigInt with @default(autoincrement()), VARCHAR maps to String, TIMESTAMP to DateTime, and BOOLEAN to Boolean.

Other Popular Database Schema Conversions

Support Microdeck

Completely optional · From $3 · No account required

Choose an amount (USD): Selected: $5

Minimum support amount is $3 USD.

Completely optional · From $3 · Checkout opens on Gumroad.