I don't know Flyway.
But I'd like to note that the language the database migration tool was built in doesn't need to match the language you're using.
Some database migration tools just take SQL or JSON or XML as input. Then there's no need for it to be in Nodejs. It just needs to support your SQL dialect.