A schema builder helper for Knex that automates database initialization and migration using JSON schema files. It provides a declarative way to define database schemas (schema.json) and versioned upgrade scripts (upgrade.####.json). The tool supports MySQL, PostgreSQL, and SQLite. Version 0.4.10 is the current stable release, with low release cadence (last update years ago). It relies on Knex as a peer dependency. Key differentiator: JSON-driven schema definition and upgrade path, ideal for projects that need a simple, migration-based DB setup without writing raw SQL or complex migration files. Note: The package is unmaintained (last commit in 2016).
npm install knex-schema-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a fresh SQLite database using a JSON schema folder with knex-schema-builder.
Consider using Knex migrations or a maintained alternative.
Ensure folder contains at least schema.json and version.json before calling install/upgrade.
Name files exactly like 'upgrade.2.json' where 2 is the target version number.
Run: npm install knex-schema-builder
Use: const schemaInstaller = require('knex-schema-builder'); then schemaInstaller.install(...)