flyway-migration-generator
v1.2.0
Published
Interactive TUI that generates Flyway SQL migration files named after the project's pom.xml version
Maintainers
Readme
flyway-migration-generator
Interactive TUI that generates empty Flyway SQL migration files named after the
project's pom.xml version:
V{yyyyMMddHHmmss}__{pomVersion}__{description}.sqlExample: V20260319231125__3_5_11__some_description_here.sql
Install
npm install -g flyway-migration-generatorUsage
Run inside any Maven repository:
fmgIt detects the project module (first root-level directory with a pom.xml
ending in -service, then -api, falling back to the root pom.xml), reads
the project version, lets you choose whether the migration is a main or a
test one — or pick a different root-level folder than the detected one —
shows the target migration folder
({pomFolder}/src/main/resources/db/migration or
{pomFolder}/src/test/resources/db/migration), asks for a short description
and confirms the resulting file name before creating it.
Non-interactive mode:
fmg --description "add status column to users"Use --test (-t) to create it in the test migrations folder
(src/test/resources/db/migration) instead:
fmg --test --description "seed data for users test"Use --folder (-f) to target a specific root-level folder instead of the
auto-detected *-service / *-api module (it must contain a pom.xml):
fmg --folder my-module --description "add audit table"Development
npm install
npm test