New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prisma-migration-migrator

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-migration-migrator - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "prisma-migration-migrator",
"version": "0.0.7",
"version": "0.0.8",
"description": "Ever wanted to use JS when using Prisma migrations? This is the tool for you.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -53,5 +53,5 @@ ## Description

**Congrats! You now have the power to run sorted, JS-powered migrations!**
**Congrats! You now have the power to run Knex-powered migrations!**
4. **Extra Step:** After running a migration from knex the first time, you need to add knex's migration history table to the prisma schema. This way, prisma will ignore the tables knex uses to track migration history. To do this, copy the following to your prisma schema:
4. **Extra Step:** After running a migration from knex for the first time, you need to add knex's migration history table to the prisma schema. This way, prisma will ignore the tables knex uses to track migration history. To do this, copy the following to your prisma schema:
```prisma

@@ -93,10 +93,3 @@ model knex_migrations {

- The `knexFilePrismaAdapter` is a helper function that adapts the knexfile to work with prisma. It will add the necessary tables to the knex migration history table, and will filter the migrations that were already run by prisma. This way, knex will only run the migrations that were not run by prisma (or itself) before. The Prisma ones will be ignored by the adapter, and the knex ones... well, that's the knex_migrations table for!.
- You have Knex's full power:
- You can now use JS to do migrations.
- You have access to all the knex plugins and features.
- You can also use the `up` and `down` commands to handle rollbacks!
Check [knexjs' official docs](https://knexjs.org/guide/migrations.html) for more details on how to use knex migrations
## TODO

@@ -103,0 +96,0 @@ - Figure out if the migrations can be run in a way that prisma detects it doesn't need to make other changes (figure out if on top of the knex history table, the migration can be modified to update the prisma history table). This would enable that prisma never notices that it's not actually running the migrations. See: https://github.com/prisma/prisma/blob/main/packages/migrate/src/Migrate.ts. Maybe I can use that to my advantage.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc