E
E
EVOSandru62020-04-19 02:13:50
PostgreSQL
EVOSandru6, 2020-04-19 02:13:50

How to migrate node-pg-migrate using a specific migrations-dir path?

Hello!

I want to use this extension for database migration.
https://salsita.github.io/node-pg-migrate/#/cli

The Configuration item contains lists of available arguments, including:
migrations-dir

I need migrations to be rolled not from ./migrations, but from ./ I

tried src/migrations But I get: Error: Can't get migration files: Error: ENOENT: no such file or directory, scandir '/var/www/migrations/' I didn't understand how to use these arguments. Has anyone encountered such a problem?

npm run migrate up -m='src/migrations';




Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grinat, 2020-04-19
@grinat

npm run migrate up --m 'src/migrations'

Or
npm run migrate up -m 'src/migrations'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question