Resolve "Добавить версионирование БД в проект" #33
@ -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'
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
|
21
src/main/resources/db/changelog-20210317_140000-schema.xml
Normal file
21
src/main/resources/db/changelog-20210317_140000-schema.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||
<changeSet author="orion" id="20210317-140000-1">
|
||||
<createTable tableName="commit">
|
||||
<column name="id" type="integer">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="hash" type="varchar(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="date" type="timestamp">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="author" type="text"/>
|
||||
<column name="message" type="text"/>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="id" constraintName="pk_commit" tableName="commit"/>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
7
src/main/resources/db/changelog-master.xml
Normal file
7
src/main/resources/db/changelog-master.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||
<include file="db/changelog-20210317_140000-schema.xml"/>
|
||||
</databaseChangeLog>
|
Loading…
Reference in New Issue
Block a user