knex-migrate-sql-file
JSON →A utility library for Knex.js that allows writing SQL migrations using .up.sql and .down.sql files instead of (or in addition to) programmatic schema methods. Version 2.0.0 is the latest stable release, with infrequent updates. It provides functions to load and execute SQL files as Knex raw queries, supporting both CommonJS and ESM modules. Key differentiators include zero-dependency generated migration files, simple integration with existing Knex setups, and type safety with TypeScript definitions.
Resources
packageknex-migrate-sql-file ↗
API endpoints
full doc /v1/registry/knex-migrate-sql-file