Skip to content

Commit a2bb00f

Browse files
committed
Initial set-up of Flyway data migration project
1 parent b8e0845 commit a2bb00f

11 files changed

Lines changed: 371 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**
5+
!**/src/test/**
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
out/
22+
23+
### NetBeans ###
24+
/nbproject/private/
25+
/nbbuild/
26+
/dist/
27+
/nbdist/
28+
/.nb-gradle/
29+
30+
### VS Code ###
31+
.vscode/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
plugins {
2+
id 'org.springframework.boot' version '2.2.2.RELEASE'
3+
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
4+
id 'java'
5+
}
6+
7+
group = 'io.reflectoring'
8+
version = '0.0.1-SNAPSHOT'
9+
sourceCompatibility = '11'
10+
11+
repositories {
12+
mavenCentral()
13+
}
14+
15+
dependencies {
16+
implementation 'org.springframework.boot:spring-boot-starter'
17+
implementation 'org.flywaydb:flyway-core'
18+
testImplementation('org.springframework.boot:spring-boot-starter-test') {
19+
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
20+
}
21+
}
22+
23+
test {
24+
useJUnitPlatform()
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '2.1'
2+
3+
services:
4+
db:
5+
image: postgres:12.0-alpine
6+
container_name: local-postgres
7+
environment:
8+
POSTGRES_PASSWORD: 'R6&)4#pg{G'
9+
POSTGRES_USER: raika
10+
expose:
11+
- 5432
12+
ports:
13+
- 5432:5432
14+
healthcheck:
15+
test: ["CMD-SHELL", "pg_isready -U raika -d raika"]
16+
interval: 5s
17+
timeout: 31s
18+
retries: 6
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

spring-boot/data-migration/flyway/gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spring-boot/data-migration/flyway/gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'flyway'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.reflectoring.flyway;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class FlywayApplication {
8+
9+
public static void main(String[] args) {
10+
SpringApplication.run(FlywayApplication.class, args);
11+
}
12+
13+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
spring:
2+
datasource:
3+
url: jdbc:postgresql://db:5432/test
4+
5+
flyway:
6+
url: "${spring.datasource.url}"
7+
user: test
8+
password: test
9+
schemas: public

0 commit comments

Comments
 (0)