redwert / pg-dump-restore

Utility that gives ability to call pg_dump and pg_restore from nodejs.
7 stars 8 forks source link

how to use it with knex? #11

Closed edgardoll4 closed 3 months ago

edgardoll4 commented 7 months ago

First of all, thank you for your contribution.

I am using strapi, which from what I have seen uses knex as orm, I would like to know how I can use it with knex instead of sequelize.

redwert commented 7 months ago

sequelize is in dev-dependencies only to run tests. The module functionality itself doesn't use it at all. So use npm install --omit=dev

edgardoll4 commented 7 months ago

I have a suggestion to put in the code so that the backup can be created with INSERT instead of COPY, since with COPY it gave me an error when backing up and I created the backup with the extension .slq.

add it to the package index on line 32 >>> args.push("--column-inserts");

image

edgardoll4 commented 7 months ago

image

I added another parameter in the index, it is to see if that feature can be added in the next version.

redwert commented 7 months ago

Welcome to create pull request with needed changes