0.2.9 • Published 12 months ago

@ruheni/db-diff v0.2.9

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

db-diff

db-diff is a helper library built on top of the Prisma CLI for auto-generating and versioning customizable database migrations (compatible with Postgrator). By default, the library auto-generates both up and `down migrations when you run the command.

If you already have an existing Prisma schema in your project, run the following command

npm i --save-dev @ruheni/db-diff
npx db-diff

Optional arguments:

OptionArgumentsDefaultDescription
--schema./prisma/schema.prismaPath to your Prisma schema file.
--migrations-dir./migrationsPath to your migrations directory. If the folder will be created if it doesnn't exist
--upGenerate only the up migration only
--downGenerate only the down migration only

Example usage:

npx db-diff --migrations-dir ./src/migrations

Generate only the up migration:

npx db-diff --up

Generate only the down migration:

npx db-diff --down
0.2.7

1 year ago

0.2.9

12 months ago

0.2.8

1 year ago

0.2.6

1 year ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago