Fix flyway migration and use h2 in unit tests.
All checks were successful
Backend CI / Run Maven Tests (pull_request) Successful in 27s

This commit is contained in:
2025-08-07 19:04:21 +03:00
parent 0bd01caf23
commit c8a1158a6d
6 changed files with 108 additions and 20 deletions

View File

@@ -1,10 +1,21 @@
spring:
datasource:
url: jdbc:postgresql://localhost:5432/your_test_database
username: test_user
password: test_password
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL
username: sa
password:
driver-class-name: org.h2.Driver
h2:
console:
enabled: true
jpa:
hibernate:
ddl-auto: none # Let Flyway handle schema creation
show-sql: true
database-platform: org.hibernate.dialect.H2Dialect
flyway:
enabled: true
clean-disabled: false # Allow clean in tests
locations: classpath:db/migration
locations: classpath:db/migration