Commit graph

3 commits

Author SHA1 Message Date
Matthew Wraith
0fd7f79820 Make default conn string tests runtime dependent
The tests originally only worked on linux. This makes them work on
whatever runtime the tests are running on.
2021-08-05 23:00:59 -07:00
Matthew Wraith
8175745cfe Postgres defaults to unix socket with no host #229
Closes #229

When there's no host given in a postgres connection url, use the unix
domain default socket. Previously, the default was a localhost TCP
connection. This default behavior is more in line with standard postgres
clients out there, like psql.
2021-08-04 15:22:21 -07:00
Adrian Macneil
61771e386d
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).
2020-11-19 15:04:42 +13:00
Renamed from pkg/dbmate/postgres_test.go (Browse further)