Microdeck.tools 100% 瀏覽器本地執行
資料庫架構與程式碼轉換 100% 瀏覽器本地執行

MySQL CREATE TABLE 轉 Prisma Schema 線上轉換工具

將包含 AUTO_INCREMENT 與 VARCHAR 長度設定的 MySQL 資料表定義,快速轉換為乾淨的 Prisma Schema 模型。

SQL Dialect:
Target Output:
prisma Output✓ Parsed 1 table (AST transpiler)
model Tags {
  id               Int @id @default(autoincrement())
  slug             String @unique
  created_at       DateTime? @default(now())

  @@map("tags")
}

這個工具替您省下寶貴時間了嗎? 歡迎自願贊助,協助 Microdeck 維持免費與穩定運作 · 最低 $3 起。

轉換範例:MySQL DDL → Prisma Schema

輸入 (MySQL DDL)
CREATE TABLE categories (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(100) NOT NULL
);
輸出 (Prisma Schema)
model Category {
  id    Int    @id @default(autoincrement())
  title String
}

常見問題 (FAQ)

Prisma 是否支援 MySQL 的自動遞增主鍵?

支援,INT AUTO_INCREMENT 會直接對應為 Int @id @default(autoincrement())。

其他熱門資料庫架構轉換

支持 Microdeck

完全自願 · $3 起 · 免註冊帳號

選擇金額 (USD):已選金額:$5

單次最低贊助金額為 $3 USD。

完全自願 · $3 起 · 將透過 Gumroad 安全結帳頁面完成。