Add cgo build constraint for sqlite support (#25)

Required to upgrade https://github.com/mattn/go-sqlite3 which does not compile correctly with missing cgo.
This commit is contained in:
Adrian Macneil 2018-01-23 16:17:19 -08:00 committed by GitHub
parent cc769e9605
commit fbddb76b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 10 deletions

View file

@ -1,3 +1,5 @@
// +build cgo
package dbmate
import (
@ -12,6 +14,11 @@ import (
_ "github.com/mattn/go-sqlite3" // sqlite driver for database/sql
)
func init() {
RegisterDriver(SQLiteDriver{}, "sqlite")
RegisterDriver(SQLiteDriver{}, "sqlite3")
}
// SQLiteDriver provides top level database functions
type SQLiteDriver struct {
}