A database management utility for knex that provides administrative operations like creating/dropping databases and users, truncating tables, and copying databases. Version 0.7.1 supports PostgreSQL, MySQL, and SQLite3, and is compatible with knex 0.x, 1.x, and 2.x. It is a maintained fork of the original knex-db-manager, updated to work with newer knex versions. Key differentiators: uses superuser credentials for privileged operations, supports collation and seed patterns, and includes truncate with ignore tables. Release cadence: sporadic.
npm install knex-db-manager-continuedVerified import paths — ran on the pinned version, not inferred.
Shows how to configure and use databaseManagerFactory to create a user and database.
Ensure your knex connection user is a superuser or provide separate superuser credentials in dbManager config.
Change const dbManager = require('knex-db-manager-continued') to const { databaseManagerFactory } = require('knex-db-manager-continued'); const dbManager = databaseManagerFactory(config);Avoid calling copyDb for MySQL databases. Use pg_dump or other MySQL-specific tools for copying.
Temporarily disable foreign key checks before calling truncateDb, or use DELETE with cascade manually.
For MySQL, omit collate option or set to empty array.
Install knex-db-manager-continued: npm install knex-db-manager-continued
Use require() correctly; no fix needed if using CJS. For ESM, use import syntax.
Use const { databaseManagerFactory } = require('knex-db-manager-continued');