Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

riseworks/prisma-mysql-comments-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate database comments from Prisma schema to a MySQL database.

It is based on the following code idea. Thank you @Jyrno42 .

Features

  • Create a migration SQL for theALTER TABLE table_name MODIFY COLUMN column_name column_type COMMENT "comment"; statement based on the information in theschema.prisma file.
    • Comments written with triple slashes (///) are eligible.
  • Supports only column comments for now (PRs are welcome).

Usage

Install this package.

npm install --save-dev prisma-mysql-comments-generator

Add the generator to theschema.prisma

generatorcomments {provider="prisma-mysql-comments-generator"}

Runnpx prisma generate to trigger the generator.A SQL file withALTER TABLE table_name MODIFY COLUMN column_name column_type COMMENT "comment"; is generated in the migrations folder.

License

MIT

Author

thelinuxlich

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp