1.1.4 • Published 4 months ago

prisma-mysql-comments-generator v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

prisma-mysql-comments-generator

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 the ALTER TABLE table_name MODIFY COLUMN column_name column_type COMMENT "comment"; statement based on the information in the schema.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 the schema.prisma

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

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

License

MIT

Author

thelinuxlich

1.1.1

8 months ago

1.1.0

8 months ago

1.0.1

8 months ago

1.1.4

4 months ago

1.1.3

5 months ago

1.1.2

8 months ago

1.0.0

8 months ago