Quarkus - Liquibase

Liquibase extension for Quarkus

Лицензия

Лицензия

Категории

Категории

Quarkus Контейнер Микросервисы Liquibase Данные Базы данных
Группа

Группа

com.konnectkode
Идентификатор

Идентификатор

quarkus-liquibase-parent
Последняя версия

Последняя версия

1.0.0.CR2
Дата

Дата

Тип

Тип

pom
Описание

Описание

Quarkus - Liquibase
Liquibase extension for Quarkus
Ссылка на сайт

Ссылка на сайт

https://github.com/konnectkode/quarkus-liquibase
Система контроля версий

Система контроля версий

https://github.com/konnectkode/quarkus-liquibase.git

Скачать quarkus-liquibase-parent

Имя Файла Размер
quarkus-liquibase-parent-1.0.0.CR2.pom 10 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.konnectkode/quarkus-liquibase-parent/ -->
<dependency>
    <groupId>com.konnectkode</groupId>
    <artifactId>quarkus-liquibase-parent</artifactId>
    <version>1.0.0.CR2</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.konnectkode/quarkus-liquibase-parent/
implementation 'com.konnectkode:quarkus-liquibase-parent:1.0.0.CR2'
// https://jarcasting.com/artifacts/com.konnectkode/quarkus-liquibase-parent/
implementation ("com.konnectkode:quarkus-liquibase-parent:1.0.0.CR2")
'com.konnectkode:quarkus-liquibase-parent:pom:1.0.0.CR2'
<dependency org="com.konnectkode" name="quarkus-liquibase-parent" rev="1.0.0.CR2">
  <artifact name="quarkus-liquibase-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.konnectkode', module='quarkus-liquibase-parent', version='1.0.0.CR2')
)
libraryDependencies += "com.konnectkode" % "quarkus-liquibase-parent" % "1.0.0.CR2"
[com.konnectkode/quarkus-liquibase-parent "1.0.0.CR2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • runtime
  • deployment
  • test-report

Quarkus-Liquibase - A extension Liquibase extension for quarkus framework

CircleCI Codecov Maven Central GitHub

Using Quarkus Liquibase

OBS: THIS LIBRARY DOES NOT SUPPORT NATIVE IMAGE

Setting up support for Liquibase

To start using Liquibase with your project, you just need to:

  • add your migrations to the src/main/resources/db/migration
  • activate the migrate-at-start option to migrate the schema automatically or inject the Liquibase object and run your migration

In your pom.xml, add the following dependencies:

  • the Liquibase extension
  • your JDBC driver extension
<dependencies>
    <!-- Liquibase specific dependencies -->
    <dependency>
        <groupId>com.konnectkode</groupId>
        <artifactId>quarkus-liquibase</artifactId>
    </dependency>

    <!-- JDBC driver dependencies -->
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-jdbc-postgresql</artifactId>
    </dependency>
</dependencies>

Liquibase support relies on the Quarkus default datasource config, you must add the default datasource properties to the application.properties file in order to allow Liquibase to manage the schema. Also, you can customize the Liquibase behaviour by using the following properties:

quarkus.liquibase.migrate-at-start

true to execute Liquibase automatically when the application starts, false otherwise. default: false

quarkus.liquibase.changelog

Changelog file path that contains the liquibase migrations
default: classpath:db/migration

quarkus.liquibase.default-schema

The name of the default schema. By default the liquibase tables are placed in the default schema for the connection provided by the datasource. When the quarkus.liquibase.default-schema property is set, the tables are placed in the provided schema.
default: <none>

quarkus.liquibase.contexts

Liquibase supports contexts a comma-separated list of contexts that works like profiles (Liquibase Contexts).
Default: <none>

The following is an example for the application.properties file:

quarkus.datasource.url=jdbc:postgresql://localhost:5432/database
quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.username=liquibase
quarkus.datasource.password=liquibase

# Liquibase minimal config properties
#quarkus.liquibase.changelog=db/changelog.xml
#quarkus.liquibase.default-schema=production
#quarkus.liquibase.contexts=production,migration

Версии библиотеки

Версия
1.0.0.CR2