SAP / go-ase

SAP ASE Database Client for Go
Apache License 2.0
25 stars 14 forks source link

Support for migrate #60

Open ntnn opened 4 years ago

ntnn commented 4 years ago

migrate is a Golang application and library to apply migrations based on .sql files. The dabase/sql interface doesn't hand itself nicely to this, as it doesn't support bulk transactions and support to send multiple language commands per query depends on the driver.

To add support the driver interface from migrate must be implemented: https://github.com/golang-migrate/migrate/blob/master/database/driver.go The library works similar to database/sql/driver - a valid driver must register itself.

To avoid forcing more dependencies than absolutely required these implementations should be placed in separate packages - e.g. cgo in cgo/migrate and go in go/migrate. Consumers can then explicitly import these packages.