mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-11 23:50:04 +01:00
Refactor drivers into separate packages (#179)
`dbmate` package was starting to get a bit polluted. This PR migrates each driver into a separate package, with clean separation between each. In addition: * Drivers are now initialized with a URL, avoiding the need to pass `*url.URL` to every method * Sqlite supports a cleaner syntax for relative paths * Driver tests now load their test URL from environment variables Public API of `dbmate` package has not changed (no changes to `main` package).
This commit is contained in:
parent
c907c3f5c6
commit
61771e386d
23 changed files with 1195 additions and 1078 deletions
4
main.go
4
main.go
|
|
@ -11,6 +11,10 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/amacneil/dbmate/pkg/dbmate"
|
||||
_ "github.com/amacneil/dbmate/pkg/driver/clickhouse"
|
||||
_ "github.com/amacneil/dbmate/pkg/driver/mysql"
|
||||
_ "github.com/amacneil/dbmate/pkg/driver/postgres"
|
||||
_ "github.com/amacneil/dbmate/pkg/driver/sqlite"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue