From 16271d2a84ebc88c75dc90a7446d2c9382af56a6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 17 Mar 2021 14:18:24 +0400 Subject: [PATCH] #5 -- Add liquibase dependency, create changelog for commits table --- build.gradle | 1 + src/main/resources/application.properties | 6 +++++- .../db/changelog-20210317_140000-schema.xml | 21 +++++++++++++++++++ src/main/resources/db/changelog-master.xml | 7 +++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/changelog-20210317_140000-schema.xml create mode 100644 src/main/resources/db/changelog-master.xml diff --git a/build.gradle b/build.gradle index 26c609b..703b519 100644 --- a/build.gradle +++ b/build.gradle @@ -52,6 +52,7 @@ dependencies { compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hibernate5' compile group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc' compile group: 'org.postgresql', name: 'postgresql', version: '9.4.1212' + compile group: 'org.liquibase', name: 'liquibase-core', version: '4.3.1' compile group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0' diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 734980c..f061be5 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -10,4 +10,8 @@ messages.basename.path=messages_en.properties spring.datasource.url=jdbc:postgresql://localhost:5432/repo spring.datasource.username=postgres spring.datasource.password=postgres -spring.datasource.driverclassName=org.postgresql.Driver \ No newline at end of file +spring.datasource.driverclassName=org.postgresql.Driver +# Liquibase Settings +spring.liquibase.drop-first=false +spring.liquibase.enabled=true +spring.liquibase.change-log=classpath:db/changelog-master.xml diff --git a/src/main/resources/db/changelog-20210317_140000-schema.xml b/src/main/resources/db/changelog-20210317_140000-schema.xml new file mode 100644 index 0000000..0b1e0ba --- /dev/null +++ b/src/main/resources/db/changelog-20210317_140000-schema.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml new file mode 100644 index 0000000..b135ee0 --- /dev/null +++ b/src/main/resources/db/changelog-master.xml @@ -0,0 +1,7 @@ + + + +