Reputation: 245
I am using Spring-Boot v1.1.10.RELEASE for my spring based web application. My DB is Postgres & used Flyway for my DB migration.
The postgres sql script file is successfully executed by flyway-maven-plugin by the following maven command i.e. mvn compile flyway:migrate
But the same Postgres sql script file is throwing PSQLException: ERROR: COPY from stdin failed: The JDBC driver currently does not support COPY operations error when running through the Spring-Boot Application.java file.
NOTE: From spring-boot I am executing the script file on fresh DB i.e. at least there is no SCHEMA_VERSION table in DB.
Any inputs?
Thanks, Baji
Upvotes: 1
Views: 1411
Reputation: 116031
By default, Spring Boot 1.1 uses Flyway 3.0 which does not support COPY FROM STDIN
. Support was added in 3.1. You can either upgrade to Spring Boot 1.2 (which uses Flyway 3.1 by default) or stick with Spring Boot 1.1 and try overriding the version of Flyway to 3.1.
Upvotes: 1