mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-16 01:43:48 +01:00
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:
parent
cc769e9605
commit
fbddb76b84
6 changed files with 30 additions and 10 deletions
|
|
@ -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 {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue