умееет сам автоматически генерировать базу и данные
https://www.baeldung.com/spring-boot-data-sql-and-schema-sql
Liquibase - программа для миграции БД.
добавляем зависимость в Maven .
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.6.3</version>
</dependency>
подключаем Maven плагин.
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>2.0.5</version>
<configuration>
<propertyFileWillOverride>true</propertyFileWillOverride>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>src/main/resources/changelogs/changelog.xml</changeLogFile>
</configuration>
<executions>
<execution>
<!-- Another Error: plugin execution not covered by lifecycle configuration..-->
</execution>
</executions>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
</dependencies>
</plugin>
Создаем файл resources/liquibase.properties
Вставляем настройки .
driver: org.postgresql.Driver
classpath: ../ojdbc14.jar
url: jdbc:postgresql://localhost:5432/postgres
username: postgres
password: 1
Создаем файл resources/changelogs/changelog.xml
Вставляем схему БД .
liquibase:dropAll
liquibase:migrate