Atlas driver support for YDB#3682
Conversation
|
Thanks for the contribution, @kprokopenko. Unfortunately, we don't accept external contribution at this stage to Atlas drivers, as I wrote in the past here: #3057 (comment) If the YDB team is interested in having this database supported in Atlas, we would be more than happy to partner with them. However, development and maintenance for these databases happen in a separate repository. If this is relevant, feel free to drop me a message on our Discord and we can take it from there. Cheers! |
Hello! Thank you for replying so quickly. |
0ec3773 to
bf7848c
Compare
Hello there! @LostImagin4tion is currently working on adding support for YDB to ent. Atlas migration support for YDB is a prerequisite for completing the ent integration, as ent relies on Atlas for its schema migration engine.
This PR introduces Atlas driver support for YDB, including schema inspection, diffing, and migration planning/applying. The implementation follows the same patterns used by existing drivers (postgres, mysql, sqlite).
What's included
Core driver (
sql/ydb/):driver.gotypes.goinspect.godiff.gomigrate.goCREATE TABLE, DROP TABLE, RENAME TABLE, ADD/DROP COLUMN, ADD/DROP/RENAME INDEX. All plans are non-transactionalconvert.goattributes.goYDB-specific design decisions
/local/dir1/table1) maps to Atlas's schema concept. Tables can live in subdirectoriesydb.Unwrap- usingUnwrap()method to extract the native YDB driver from *sql.DB, which gives access to native Scheme and Table APIs for database inspectionNew Dependencies