convert-mysql-schema

Convert MySQL schema SQL files into Prisma models for PostgreSQL.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Dinhpham04/DA-KLTN_HOTEL_MANAGEMENT --skill convert-mysql-schema
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-mysql-schema
Source: https://github.com/Dinhpham04/DA-KLTN_HOTEL_MANAGEMENT/tree/main/.agents/skills/convert-mysql-schema
Command: npx skills add https://github.com/Dinhpham04/DA-KLTN_HOTEL_MANAGEMENT --skill convert-mysql-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlparse, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Converts MySQL database schemas into clean, optimized Prisma models suitable for PostgreSQL, streamlining database migration and improvement processes.

Core Features & Use Cases

  • Schema Conversion: Translates raw MySQL schema definitions into Prisma modeling language tailored for PostgreSQL.
  • Type Optimization: Enhances data types for better performance and maintainability.
  • Use Case: A developer migrates an existing MySQL database to a modern Prisma-based PostgreSQL setup, ensuring schema standards and audit fields are incorporated.

Quick Start

Use the convert-mysql-schema skill to generate Prisma models from the SQL dump located at docs/hotel_management_sql_create.sql.

Frequently Asked Questions about convert-mysql-schema

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a MySQL schema to Prisma for PostgreSQL?

To convert a MySQL schema to Prisma for PostgreSQL, you parse raw SQL dump files and generate optimized Prisma models. This process handles type mapping and naming conventions to streamline database migration.

What is the best way to map MySQL data types to PostgreSQL using Prisma?

Mapping MySQL data types to PostgreSQL is handled by parsing the SQL definitions and applying type optimization during Prisma code generation. This ensures better performance and maintainability across the migrated database schema.

Does this MySQL to Prisma schema conversion require the sqlparse dependency?

Yes, the schema conversion process relies on the sqlparse dependency to accurately parse raw MySQL SQL files. This parsing mechanism is required to translate the database definitions into the Prisma modeling language.

Can I add audit fields automatically when migrating MySQL to Prisma models?

Yes, you can add audit fields automatically when migrating MySQL to Prisma models. The conversion process incorporates these production-grade audit fields directly into the generated Prisma schema for better data management.

How do I generate Prisma models from an existing SQL dump file?

You generate Prisma models from an existing SQL dump by providing the SQL file to the conversion process. The parser reads the raw MySQL schema definitions and outputs clean, optimized Prisma modeling language.