Skip to content
Advertisement

Flyway did not create tables

I have been trying to create a web application using spring boot and flyway. The build tool is Gradle. However, when I try to run the program Flyway creates just one table named flyway_schema_hystory but doesn’t create a table from SQL script. Script V1__Create_all_tables.sql is on correct package src/main/resources/db/migration. Dependency in build.gradle was added, flyway properties were added in app.properties as well. Spring boot runs without errors.

build.gradle dependencies

JavaScript

app.properties

JavaScript

Example of sql script for creating a table (I’m using postgresql):

JavaScript

flyway_schema_hystory

What’s can be a problem?

Advertisement

Answer

Try changing the name, I think v1 is reserved for the flyway’s initial migration. Try something like V1_1__create_all_tables.sql

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement