Skip to content

Commit

Permalink
FACT-1766 bump flyway and postgresql (#2559)
Browse files Browse the repository at this point in the history
* git adding code to bump versions

* updated other parts of build.gradle

* added runtimeonly line

* added postgresqlTransactionalLock to false

* Fix int tests

---------

Co-authored-by: Josh Blackmoor <[email protected]>
  • Loading branch information
justiceia and joshblackmoor authored Jun 28, 2024
1 parent 455c4b5 commit 14241b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import org.flywaydb.gradle.task.FlywayMigrateTask

buildscript {
dependencies {
classpath("org.postgresql:postgresql:42.7.3")
classpath("org.flywaydb:flyway-database-postgresql:10.13.0")
}
}

plugins {
id 'application'
id 'checkstyle'
id 'pmd'
id 'jacoco'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.flywaydb.flyway' version '9.22.1'
id 'org.flywaydb.flyway' version '10.13.0'
id 'org.springframework.boot' version '3.2.3'
id 'org.owasp.dependencycheck' version '9.0.8'
id 'com.github.ben-manes.versions' version '0.50.0'
Expand Down Expand Up @@ -265,7 +272,8 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-batch'
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor'

implementation group: 'org.flywaydb', name: 'flyway-core', version: '8.5.13'
runtimeOnly group: 'org.flywaydb', name: 'flyway-database-postgresql', version: '10.13.0'
implementation group: 'org.flywaydb', name: 'flyway-core', version: '10.13.0'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.3'

implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-provider-jdbc-template', version: '5.10.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.boot.autoconfigure.flyway.FlywayConfigurationCustomizer;
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import uk.gov.hmcts.reform.sendletter.data.migration.FlywayNoOpStrategy;

import java.util.Map;

/**
* Configuration for Flyway.
*/
Expand Down Expand Up @@ -45,4 +48,9 @@ public FlywayMigrationStrategy flywayMigrationStrategy() {
public FlywayMigrationStrategy flywayVoidMigrationStrategy() {
return null;
}

@Bean
public FlywayConfigurationCustomizer flywayCustomizer() {
return configuration -> configuration.configuration(Map.of("flyway.postgresql.transactional.lock", "false"));
}
}

0 comments on commit 14241b7

Please sign in to comment.