barn-sql-client

Quarkus barn is reactive database migration tool

Лицензия

Лицензия

Категории

Категории

Quarkus Контейнер Микросервисы CLI Взаимодействие с пользователем
Группа

Группа

org.lorislab.quarkus
Идентификатор

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

barn-sql-client
Последняя версия

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

0.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

barn-sql-client
Quarkus barn is reactive database migration tool
Организация-разработчик

Организация-разработчик

lorislab

Скачать barn-sql-client

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

<!-- https://jarcasting.com/artifacts/org.lorislab.quarkus/barn-sql-client/ -->
<dependency>
    <groupId>org.lorislab.quarkus</groupId>
    <artifactId>barn-sql-client</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.lorislab.quarkus/barn-sql-client/
implementation 'org.lorislab.quarkus:barn-sql-client:0.4.0'
// https://jarcasting.com/artifacts/org.lorislab.quarkus/barn-sql-client/
implementation ("org.lorislab.quarkus:barn-sql-client:0.4.0")
'org.lorislab.quarkus:barn-sql-client:jar:0.4.0'
<dependency org="org.lorislab.quarkus" name="barn-sql-client" rev="0.4.0">
  <artifact name="barn-sql-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.lorislab.quarkus', module='barn-sql-client', version='0.4.0')
)
libraryDependencies += "org.lorislab.quarkus" % "barn-sql-client" % "0.4.0"
[org.lorislab.quarkus/barn-sql-client "0.4.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.lorislab.quarkus : barn jar 0.4.0
io.quarkus : quarkus-core jar
io.quarkus : quarkus-arc jar

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

Данный проект не имеет модулей.

Barn Quarkus extension

License GitHub Workflow Status (branch) GitHub release (latest SemVer) Maven Central

Barn Quarkus extension is database migration tool for the reactive database client. The naming convention for migration scripts is as in Flyway documentation. Supported are Versioned and Repeatable migration scripts.

Versioned Migrations

Example: V2__Add_new_table.sql

  • Prefix: V
  • Version: Version with dots separate as many parts as you like.
  • Separator: __ (two underscores)
  • Description: Underscores or spaces separate the words
  • Suffix: .sql

Repeatable Migrations

Repeatable migration will be executed only if checksum of the script change and there is new Versioned migration to run.

Example: R__Add_new_table.sql

  • Prefix: R
  • Separator: __ (two underscores)
  • Description: Underscores or spaces separate the words
  • Suffix: .sql

How to use it

Add maven dependency for your database pool:

  • org.lorislab.quarkus:barn-pg-client
  • org.lorislab.quarkus:barn-mysql-client

Create your database migration SQL scripts in the src/main/resources/db/migration directory.

+ src
   + main
      + resources
         + db
            + migration
               - V1.0_Create_tables.sql
               - V1.1_Add_search_index.sql
               - R__Update_descruption.sql

Add these properties to the applications.properties

# Clean schema before migration. Default: false
quarkus.barn.clean-at-start=true
# Start migration at start. Default: false
quarkus.barn.migrate-at-start=true
# Import test data after migration. Default: false 
quarkus.barn.test-data=true
# Test data scripts. Default: empty array
quarkus.barn.test-data-scripts=db/import/test1.sql,db/import/test2.sql

Postgres SQL reactive client

Maven dependency

<dependency>
    <groupId>org.lorislab.quarkus</groupId>
    <artifactId>barn-pg-client</artifactId>
    <version>{latest-release-version}</version>
</dependency>

Mysql reactive client

Maven dependency

<dependency>
    <groupId>org.lorislab.quarkus</groupId>
    <artifactId>barn-mysql-client</artifactId>
    <version>{latest-release-version}</version>
</dependency>
org.lorislab.quarkus

lorislab

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

Версия
0.4.0
0.3.0
0.2.0
0.1.0