Microdeck.tools 100% Trên trình duyệt
Chuyển đổi Schema & Mã 100% Trên trình duyệt

Chuyển SQL CREATE TABLE sang Drizzle ORM Schema Online

Chuyển đổi nhanh truy vấn SQL CREATE TABLE DDL sang định nghĩa Drizzle ORM bằng TypeScript (pgTable, mysqlTable, sqliteTable) ngay trên trình duyệt, bảo mật tuyệt đối.

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(),
});

Công cụ này có giúp bạn tiết kiệm thời gian không? Chung tay giữ Microdeck miễn phí và ổn định. Hoàn toàn tự nguyện · Từ $3.

Ví dụ chuyển đổi: SQL DDL → Drizzle ORM

Đầu vào (SQL DDL)
CREATE TABLE posts (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  content TEXT,
  published BOOLEAN DEFAULT false
);
Kết quả (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),
});

Câu hỏi thường gặp (FAQ)

Drizzle ORM có hỗ trợ các hệ quản trị PostgreSQL, MySQL và SQLite không?

Có! Drizzle cung cấp các module riêng biệt cho từng hệ cơ sở dữ liệu (pgTable, mysqlTable, sqliteTable).

Các cặp chuyển đổi Schema phổ biến khác

Ủng hộ Microdeck

Hoàn toàn tự nguyện · Từ $3 · Không cần tài khoản

Chọn mức ủng hộ (USD):Đã chọn:$5

Mức ủng hộ tối thiểu là $3 USD.

Hoàn toàn tự nguyện · Từ $3 · Thanh toán qua Gumroad.