golang-migrate / migrate

Database migrations. CLI and Golang library.
Other
15.14k stars 1.39k forks source link

Add DuckDB support to migrate #1077

Open michaelmdresser opened 5 months ago

michaelmdresser commented 5 months ago

This code was originally written here https://github.com/kubecost/golang-migrate-duckdb/tree/mmd/make-importable and has been moved to my fork for upstreaming. I focused on duplicating the sqlite3 implementation because DuckDB is behaviorally similar to SQLite. This code has been used in a private project successfully for a little while now.

DuckDB unfortunately has a CGO requirement like sqlite. I was not sure how to run the test suite using the Makefile when there is a CGO dependency present, so I just used a manual go test -v ./database/duckdb/... to see if the unit tests succeeded. Please let me know if there is a way I can run the full test suite locally so as to not waste CI time.

coveralls commented 5 months ago

Coverage Status

coverage: 56.384% (+0.05%) from 56.335% when pulling fbd71694005956cab621ad367c19a0ed97b078d5 on michaelmdresser:duckdb into 0c456c49a6debb0b2deb5a97a10d9e85d157b9d5 on golang-migrate:master.

dxh9845 commented 3 months ago

Hello - how can we help get this merged into the upstream? Applying migrations with golang migrate would be great.

KoduIsGreat commented 1 month ago

Any word on this getting merged?