All Questions
83
questions
10votes
6answers
35kviews
Schema related problems with Flyway / Spring and H2 embedded database
I am building a Spring 3 MVC app that uses a MySQL database and have recently integrated Flyway into the solution to manage the database migrations. I have successfully configured my ...
9votes
2answers
27kviews
H2 and Oracle Compatiability issues
I am having an issue executing the following script using Flyway and H2 database. I assume its a Oracle compatibility issue but I am using H2 with the correct mode. This script is used to construct ...
7votes
3answers
16kviews
Spring boot + flyway + H2 in memory :Caused by: org.h2.jdbc.JdbcSQLException: Table "xxxx" not found; SQL statement:
I am using H2 as in memory database in a spring boot project for unit testing. However I am getting below error
Caused by: org.hibernate.exception.SQLGrammarException: could not prepare statement
...
7votes
2answers
9kviews
Flyway integration with spring boot doesn't execute migration scripts on embedded H2 database
I am trying to make migration demo on embedded H2 data base in Spring Boot application using Flyway.
application.properties
logging.level.org.org.springframework=DEBUG
server.port=8181
spring.h2....
7votes
2answers
7kviews
how to make mysql database schema to be compatible with h2 database
I am currently using mysql as my database and use flyway to manage database schema. All my unit tests are running against mysql and they are running really slow with adding more unit tests. Now I want ...
7votes
1answer
5kviews
Use H2 Database for Spring Test Profile with Flyway
I'm attempting to setup my end-to-end tests to use an in memory database that can easily be brought up, shutdown, erased and seeded with test data. I am working on a spring project and am using flyway ...
6votes
1answer
428views
Spring Boot: Setting Hibernate naming strategy with @DataJpaTest and Flyway
I have noticed an odd behavior when trying to use the @DataJpaTest annotation in a Spring Boot test that also uses Flyway.
Given the following entity class:
@Entity
public class MyEntity {
@Id
...
5votes
1answer
5kviews
Flyway migrations not persistent in H2 embedded database
I'm actually writing a small web application with spring boot and wanted to use a (embedded) H2 database together with Spring Data JPA and Flyway for database migration.
This is my application....
5votes
1answer
7kviews
configure maven profiles in spring boot @activeprofile annotation
I have been reading a lot and can't find a solution that tells me how to inlucde the maven profiles in @activeprofiles annotation . Is it possible or not?
The issue that I am trying to solve to get ...
5votes
1answer
2kviews
Flyway clean can't drop H2 tables in lowercase
This is my flyway config:
url: jdbc:h2:./target/test;MODE=MYSQL;INIT=CREATE SCHEMA IF NOT EXISTS "test";
and this is how I initialise it in my test suite:
Flyway flyway = new Flyway();
flyway....
5votes
1answer
1kviews
How to store Flyway H2 migrations' history in another schema than PUBLIC?
Using Flyway with H2 database, I get out of the box all SQL schema migrations history stored in PUBLIC.schema_version.
I would like to store this table in a dedicated SQL schema FLYWAY, like this: ...
5votes
3answers
13kviews
ALTER TABLE CREATE CONSTRAINT IF NOT EXIST possible?
I have an application which starts (AppStarter) a web server with a web application. The Web Application has migration scripts (flyway).
I want to write some data from AppStarter through JDBC in a ...
4votes
2answers
17kviews
SpringBoot - Testing with Flyway and H2 database
I'm coding acceptance tests with Cucumber, and I want to use a H2 database for the tests.
The application-test.properties looks like:
server.port:8090
spring.jpa.database=H2
spring.database....
4votes
1answer
4kviews
baseline-on-migrate with Flyway and Spring Boot
I have seen this posted before but I had already implemented the solutions offered and so I am asking again with more detail to my specific situation. I am trying to integrate Flyway in my SpringBoot ...
4votes
2answers
3kviews
SpringBoot, Hibernate and flyway db issue
updated with rieckpil suggestion
Hi,
right now I am facing an issue which appears only when I am using a CrudRepository to add/read entities from a H2 DB.
A very basic example which works:
My ...