gg-mysql-connector (v1.0.247) is a TypeScript-first MySQL toolkit that provides schema definition, migration, TypeScript and Zod artifact generation, and typed querying. It treats schema definitions as a single source of truth, allowing developers to define tables, columns, indexes, and foreign keys in code, then push changes to MySQL. Features include automated migration (table creation, column modification, index updates) and reverse-engineering existing databases to generate types and Zod schemas. Updated frequently with 247+ releases; requires mysql2. Differentiates from Prisma/TypeORM by being lighter-weight and more focused on schema-first workflows without an ORM layer.
npm install gg-mysql-connectorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL, defines a user table schema, and pushes it to the database using migration manager.
Ensure all numeric pool options are valid numbers. For connectionLimit, the default is 10 if invalid.
Always set boolean options to a literal true or false, not a string or number.
Use pushViews (plural) if available, or accept the typo.
Use MyModel as a type annotation for arrays of column definitions, e.g., const model: MyModel[] = [...]
Install zod: npm install zod
npm install mysql2
Change to import { GGMySQLConnector } from 'gg-mysql-connector' and ensure your project uses ESM (e.g., 'type': 'module' in package.json).Remove 'new MyModel()' and use MyModel only for type annotations.