gormigrate icon indicating copy to clipboard operation
gormigrate copied to clipboard

Pure-Go SQLite implementation

Open AnalogJ opened this issue 3 years ago • 2 comments
trafficstars

Is _ "github.com/jinzhu/gorm/dialects/sqlite" required for gormigrate to work? I'm trying to replace my usage of github.com/mattn/go-sqlite3 (which requires CGO to cross-compile) with pkg.go.dev/modernc.org/sqlite.

I've been testing with github.com/glebarez/sqlite (which is an alternative to sqlite driver for GORM https://github.com/go-gorm/gorm/issues/4101) and it seems to be working fine.

Just wanted your confirmation.

import (
	"log"

	"github.com/go-gormigrate/gormigrate/v2"
	"gorm.io/gorm"
	_ "github.com/jinzhu/gorm/dialects/sqlite"
)

AnalogJ avatar Jun 27 '22 02:06 AnalogJ

Hi @AnalogJ,

If you say it works, it works. We could consider adding that version to the CI so tests are run against that driver as well.

andreynering avatar Jul 06 '22 14:07 andreynering

please do, that would be great!

AnalogJ avatar Jul 06 '22 15:07 AnalogJ