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

Convert SQL CREATE TABLE to Drizzle ORM Schema Online

Transform SQL CREATE TABLE DDL queries into TypeScript Drizzle ORM schema definitions (pgTable, mysqlTable, sqliteTable).

SQL Dialect:
Target Output:
drizzle Output✓ Parsed 1 table (AST transpiler)
import { pgTable, serial, varchar, integer, boolean, timestamp } from "drizzle-orm/pg-core";

export const users = pgTable("users", {
  id: serial("id").primaryKey(),
  email: varchar("email", { length: 255 }).notNull().unique(),
  full_name: varchar("full_name", { length: 100 }),
  age: integer("age").default(18),
  is_active: boolean("is_active").default(true),
  created_at: timestamp("created_at").defaultNow(),
});

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 → Drizzle ORM

Input (SQL DDL)
CREATE TABLE posts (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  content TEXT,
  published BOOLEAN DEFAULT false
);
Output (Drizzle ORM)
import { pgTable, serial, varchar, text, boolean } from "drizzle-orm/pg-core";

export const posts = pgTable("posts", {
  id: serial("id").primaryKey(),
  title: varchar("title", { length: 255 }).notNull(),
  content: text("content"),
  published: boolean("published").default(false),
});

Frequently Asked Questions

Does Drizzle ORM support PostgreSQL, MySQL, and SQLite dialects?

Yes! Drizzle provides core modules for each dialect (pgTable, mysqlTable, sqliteTable).

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.