Skip to content
Advertisement

Flyway does not insert values to database

I added flyway library to my spring project. I configurated it and wrote some instuctions, project compiles but flyway does not insert values provided into data base. Config of application.yml:

 flyway:
  baseline-on-migrate: true
  enabled: false

Impl: [ressource folder]

1

SQL instructions that must be insert:

 insert role(name) values ('ROLE_USER');
 insert role(name) values ('ROLE_ADMIN');

But after running application, they dont figure in database. The table is being created but fields are null.

Advertisement

Answer

I fixed bug. I just had to change ‘enabled’ to true:

 enabled: true
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement