Flyway syntax error in one environment and not in another

23 Views Asked by At

we are getting error on below code

"Syntax error near unexpected token ("

#Define an array to store schema names

            schema_names=()

            echo "Current Directory: $(pwd)"

            #Find all SQL files and populate the schema_names array

            for script_file in $(find "$(System.DefaultWorkingDirectory)/deployment-extract/flyway" -type f -name "*.sql"); do

                #Extract the schema name dynamically from the file path using awk

                myschema=$(echo "$script_file" | awk -F'/deployment-extract/flyway/' '{split($2, a, "/"); print a[1]}')

                if [ -n "$myschema" ]; then

                    schema_names+=("$myschema")

                else

                    echo "Schema name not found in file path: $script_file"

                    exit 1

                fi

            done

we try to change our env , its working in one env but not in another.

not sure why its not working

0

There are 0 best solutions below