You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My DB migration script failed with the following error
$ bun run ./migrate.ts
50 | throw new Error(`Unable to find an executable Flyway CLI in target directory: ${directory}`);
51 | }
52 |if (executableFiles.length > 1) {
53 | const executableFilesWithCorrectName = executableFiles.filter(file => file.name.includes("flyway"));
54 |if (executableFilesWithCorrectName.length > 1) {
55 | throw new Error(`Expecting only one executable Flyway CLI to be found. Instead found multiple executable files: ${executableFiles.map(ex => ex.name)}`);
^
error: Expecting only one executable Flyway CLI to be found. Instead found multiple executable files: flyway.cmd,README.txt,flyway
at ./node_modules/node-flyway/dist/cli/service/flyway-cli-service.js:55:23
error: script "db:migrate" exited with code 1
Migration file
This migration file is just a copy paste of the example
import{Flyway}from"node-flyway";constflyway=newFlyway({url:"jdbc:postgresql://localhost:5432/postgres",user:"postgres",password:"password",defaultSchema: "public",migrationLocations: ["migrations"]});flyway.migrate().then(response=>{if(!response.success){thrownewError(`Unable to execute migrate command. Error: ${response.error?.errorCode}`);}console.log(`Migrations are successful ${response}`);});
The text was updated successfully, but these errors were encountered:
My DB migration script failed with the following error
Migration file
This migration file is just a copy paste of the example
The text was updated successfully, but these errors were encountered: