Skip to content

Latest commit

 

History

History

liquibase-dialect

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

License Maven metadata URL CI

YDB Liquibase Dialect

Overview

This project utilizes Liquibase to manage database schema changes for the Yandex Database (YDB), ensuring a consistent and version-controlled approach to database schema evolution. Liquibase is an open-source, database-independent library for tracking, managing, and applying database schema changes.

Features

  • Generate SQL (YQL) from .xml .json .yaml changelog files
  • Apply migration via YDB JDBC Driver

Getting Started

Requirements

To use this YDB Liquibase Dialect, you'll need:

Installation in Java application.

For Maven, add the following dependency to your pom.xml:

<!-- Set an actual versions -->

<dependency>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-core</artifactId>
    <version>${liquibase.core.version}</version>
</dependency>

<dependency>
    <groupId>tech.ydb.jdbc</groupId>
    <artifactId>ydb-jdbc-driver</artifactId>
    <version>${ydb.jdbc.version}</version>
</dependency>

<dependency>
    <groupId>tech.ydb.dialects</groupId>
    <artifactId>liquibase-ydb-dialect</artifactId>
    <version>${liquibase.ydb.dialect.version}</version>
</dependency>

For Gradle, add the following to your build.gradle (or build.gradle.kts):

dependencies {
    // Set actual versions
    implementation "org.liquibase:liquibase-core:$liquibaseCoreVersion"
    implementation "tech.ydb.dialects:liquibase-ydb-dialect:$liquibaseYdbDialecVersion"
    implementation "tech.ydb.jdbc:ydb-jdbc-driver:$ydbJdbcVersion"
}

Installation in Liquibase CLI

Mac OS:

# install liquibase

cp liquibase-ydb-dialect-${version-dialect}.jar /usr/local/opt/liquibase/internal/lib
cp ydb-jdbc-driver-shaded-${version-jdbc}.jar /usr/local/opt/liquibase/internal/lib

Usage

Use this custom dialect just like any other Liquibase dialect.

Integration with Spring Boot

spring.datasource.url=jdbc:ydb:grpc://localhost:2136/local

spring.liquibase.change-log=classpath:changelog.yaml

An example of a simple Spring Boot Liquibase can be found at the following link.

Limitations

To understand what SQL constructs YDB can perform, see the documentation for the query language.

Authorization

See connect to YDB.

Support and Contact

For support, you can open issues in the repository issue tracker with tag liquibase.