Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare database migration support #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<java.version>17</java.version>
<org.mapstruct.version>1.5.2.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.1</spring-cloud.version>
<liquibase.version>4.19.0</liquibase.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -48,6 +49,11 @@
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
spring.main.banner-mode=off
spring.jpa.hibernate.ddl-auto=none
spring.sql.init.mode=always

spring.sql.init.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres

server.servlet.context-path=/api/v1
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.generate-ddl=true

overworld.url=http://localhost/overworld/api/v1
keycloak.issuer=http://localhost/keycloak/realms/Gamify-IT
keycloak.url=http://localhost/keycloak/realms/Gamify-IT

springdoc.swagger-ui.path=/swagger-ui
springdoc.swagger-ui.disable-swagger-default-url=true
server.error.include-message=always

spring.liquibase.change-log=classpath:db/changelog-root.xml


12 changes: 12 additions & 0 deletions src/main/resources/db/changelog-root.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd">
<!-- Automatically queries all files in this directory in lexical order -->
<includeAll path="db/changelog/"/>
</databaseChangeLog>
Empty file.