Registry / database / prisma-mysql-comments-generator

prisma-mysql-comments-generator

JSON →
library1.1.4jsnpmunverified

A Prisma generator that produces SQL ALTER TABLE statements to add column comments to a MySQL database based on triple-slash comments in the Prisma schema. Current stable version is 1.1.4 with low release cadence. It generates a migration SQL file that can be run manually. Supports only column comments; table comments are not supported. Alternative to manually writing migration SQL or using other comment generators.

npm install prisma-mysql-comments-generator
INSTALL
IMPORT
SIG · PRISMA-MYSQL-COMME
P
prisma-mysql-comments-generator
databasejavascriptv1.1.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

generator
generator comments { provider = "prisma-mysql-comments-generator" }
Configure in schema.prisma. No JavaScript/TypeScript imports needed; the generator produces SQL files automatically during prisma generate.

Shows installation, schema configuration, and example output.

// 1. Install npm install --save-dev prisma-mysql-comments-generator // 2. Add to schema.prisma generator comments { provider = "prisma-mysql-comments-generator" } // 3. Add triple-slash comments in schema /// The user's email address model User { id Int @id @default(autoincrement()) email String /// Email of the user } // 4. Run prisma generate // npx prisma generate // A SQL file with ALTER TABLE statements is generated in the migrations folder. // Example output in migrations/xxxx_migration.sql: /* ALTER TABLE `User` MODIFY COLUMN `email` VARCHAR(191) COMMENT 'Email of the user'; */
Debug
Known issues
breakingPrisma generator not found: prisma-mysql-comments-generator
fix
Ensure the package is installed as devDependency and run npx prisma generate from the project root.
affects: all
Errors
Common errors & fixes
Error: Generator 'prisma-mysql-comments-generator' not found. Please add it to your Prisma schema.
The generator is not added to schema.prisma or the package is not installed.
fix
Add generator configuration to schema.prisma and run npm install --save-dev prisma-mysql-comments-generator.
Upgrade
Version history
1.1.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
prisma-mysql-comments-generator — npm install prisma-mysql-comments-generator · libregistry