-
Notifications
You must be signed in to change notification settings - Fork 326
sqlite3.go is included even when not needed. #40
Comments
It's not particularly clear to me what it's expecting to find, either, though I may be being completely blind. I ran into this even though I have, and am using, sqlite3 and its libraries on my machine. |
Would it be possible to enable database drives via build constraints? i.e. |
Copied from #37. I think we should follow the database/sql approach: import (
"github.com/mattes/migrate/migrate"
_ "github.com/mattes/migrate/driver/mysql"
)
func main() {
migrate.MigrateUp("mysql", ...)
} The binary |
Yes! That would be a good solution. |
Also, just an idea, you can start the refactoring from the sqlite driver first since it is the most problematic ones. And then, progressively work on the other drivers. |
Requires activating drivers with a _ style import, e.g. import "_ github.com/mattes/migrate/driver/postgres"
+1 any news on this? |
I would also like to see this added! We build with cgo off and sqlite3 can't do that. |
+1 |
Closing in favor of #43 |
The database I am using is PostgreSQL and I got this error when calling migrate
upSync
method:The error breaks
GOOS=linux go build
on darwin machine. Is it possible to include driver only when needed?For example, instead of having 1 constructor that handles them all here: https://github.com/mattes/migrate/blob/master/driver/driver.go#L44, maybe you can have 1 constructor per driver file.
The text was updated successfully, but these errors were encountered: