[BAEL4288] remove mysql flow
This commit is contained in:
parent
be1f906a9a
commit
8a98cce3db
@ -1,2 +1 @@
|
|||||||
MYSQL_PORT=3316
|
|
||||||
POSTGRES_PORT=5431
|
POSTGRES_PORT=5431
|
@ -1,14 +1,6 @@
|
|||||||
version: '3.0'
|
version: '3.0'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql-test:
|
|
||||||
image: mysql:8.0.17
|
|
||||||
ports:
|
|
||||||
- ${MYSQL_PORT}:3306
|
|
||||||
env_file:
|
|
||||||
- mysql.env
|
|
||||||
networks:
|
|
||||||
- baeldung
|
|
||||||
|
|
||||||
postgres-test:
|
postgres-test:
|
||||||
image: postgres:11.5
|
image: postgres:11.5
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
MYSQL_ROOT_PASSWORD=password
|
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD=yes
|
|
||||||
MYSQL_USER=testuser
|
|
||||||
MYSQL_PASSWORD=password
|
|
||||||
MYSQL_DATABASE=testdb
|
|
@ -18,7 +18,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.flywaydb</groupId>
|
<groupId>org.flywaydb</groupId>
|
||||||
<artifactId>flyway-core</artifactId>
|
<artifactId>flyway-core</artifactId>
|
||||||
<version>${flyway-core.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -31,37 +30,23 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.flywaydb</groupId>
|
<groupId>org.flywaydb</groupId>
|
||||||
<artifactId>flyway-maven-plugin</artifactId>
|
<artifactId>flyway-maven-plugin</artifactId>
|
||||||
<version>${flyway-maven-plugin.version}</version>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<includes>
|
|
||||||
<include>*.properties</include>
|
|
||||||
<include>db/**/*.sql</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<flyway-core.version>6.5.0</flyway-core.version>
|
|
||||||
<flyway-maven-plugin.version>6.5.0</flyway-maven-plugin.version>
|
|
||||||
<flyway.configFiles>src/main/resources/application-${db.engine}.properties</flyway.configFiles>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>h2</id>
|
<id>h2</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
<properties>
|
<properties>
|
||||||
<db.engine>h2</db.engine>
|
<spring-boot.run.profiles>h2</spring-boot.run.profiles>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -72,24 +57,10 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>mysql</id>
|
|
||||||
<properties>
|
|
||||||
<db.engine>mysql</db.engine>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>postgres</id>
|
<id>postgres</id>
|
||||||
<properties>
|
<properties>
|
||||||
<db.engine>postgres</db.engine>
|
<spring-boot.run.profiles>postgres</spring-boot.run.profiles>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -102,4 +73,8 @@
|
|||||||
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<flyway.configFiles>src/main/resources/application-${spring-boot.run.profiles}.properties</flyway.configFiles>
|
||||||
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1 +1 @@
|
|||||||
flyway.locations=db/migration,db/callbacks
|
spring.flyway.locations=classpath:db/migration,classpath:db/callback
|
@ -1,3 +0,0 @@
|
|||||||
flyway.url=jdbc:mysql://127.0.0.1:3316/testdb
|
|
||||||
flyway.user=testuser
|
|
||||||
flyway.password=password
|
|
@ -1,6 +1,3 @@
|
|||||||
spring.profiles.include=@db.engine@
|
|
||||||
|
|
||||||
spring.datasource.url=${flyway.url}
|
spring.datasource.url=${flyway.url}
|
||||||
spring.datasource.username=${flyway.user}
|
spring.datasource.username=${flyway.user}
|
||||||
spring.datasource.password=${flyway.password}
|
spring.datasource.password=${flyway.password}
|
||||||
spring.flyway.locations=${flyway.locations:db/migration}
|
|
@ -1,3 +1,3 @@
|
|||||||
create table table_one (
|
create table table_four (
|
||||||
id numeric primary key
|
id numeric primary key
|
||||||
);
|
);
|
Loading…
x
Reference in New Issue
Block a user