A MySQL schema upgrade tool for Node.js applications, version 1.2.1. It allows incremental database upgrades with version control, tracking applied changes. Supports both CommonJS and ESM. Differentiators: simple versioned migration files, automatic state tracking, and minimal configuration. Released irregularly; no major version changes noted.
npm install qy-mysql-upgradeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL and runs pending migrations from a local folder.
Name migration files like '001_init.sql', '002_add_users.sql' etc.
Explicitly set 'tableName' to a unique name like 'schema_version'.
Use 'mysql2/promise' and call createConnection().
Ensure the migrationsDir option points to an existing directory, e.g., path.resolve(__dirname, 'migrations').
Use a unique tableName or drop the conflicting table if safe.
Use named import: import { upgrade } from 'qy-mysql-upgrade'.