Skip to content

Conversation

@asmyasnikov
Copy link

@asmyasnikov asmyasnikov commented Jan 6, 2025

Added YDB support to golang-migrate

This PR implements support for YDB in golang-migrate. The main changes include:

  • Added the YDB driver
  • Implemented necessary functions for migrations, including Open, Close, Lock, Unlock, Run, SetVersion, Version, and Drop.
  • Added tests for the YDB driver in ydb_test.go, including common SQL instructions (such as CREATE/ALTER/DROP TABLE) and YDB-specific instructions (such as CREATE/DROP TOPIC - YDB message bus)
  • Updated the documentation in README.md to include instructions on how to use the YDB driver.

How to Test:

  1. Set up an YDB environment.
  2. Run the unit and integration tests to ensure all functionalities are working correctly.
  3. Follow the instructions in the documentation to test real migrations using the YDB driver.

@coveralls
Copy link

coveralls commented Jan 31, 2025

Coverage Status

coverage: 56.532% (+0.2%) from 56.314%
when pulling 001b2f0 on ydb-platform:master
into 2788339 on golang-migrate:master.

@asmyasnikov
Copy link
Author

asmyasnikov commented Mar 23, 2025

@dhui Can you see this PR? We are waiting YDB support in golang-migrate very much

Copilot AI review requested due to automatic review settings November 20, 2025 13:05
Copilot finished reviewing on behalf of asmyasnikov November 20, 2025 13:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for YDB (Yandex Database) to golang-migrate, implementing a complete database driver with migration capabilities, locking mechanisms, and comprehensive test coverage.

Key Changes:

  • New YDB database driver with full migration lifecycle support (Open, Close, Lock, Unlock, Run, SetVersion, Version, Drop)
  • Extensive test suite including integration tests with Docker containers
  • Complete documentation with connection string format and configuration options

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
internal/cli/build_ydb.go Build tag configuration to conditionally include YDB driver in CLI builds
go.mod / go.sum Added YDB SDK dependencies (v3.100.0) and related transitive dependencies
database/ydb/ydb.go Main driver implementation with connection handling, migrations, versioning, and locking
database/ydb/ydb_test.go Comprehensive test suite with Docker-based integration tests for multiple YDB versions
database/ydb/examples/migrations/*.sql Example migrations demonstrating YDB-specific features (tables, columns, indexes, topics)
database/ydb/README.md Detailed documentation covering connection strings, authentication methods, TLS options, and troubleshooting
README.md Added YDB to the list of supported database drivers
Makefile Added ydb to the DATABASE variable for build/test targets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants