mirror of
https://github.com/openziti/zrok.git
synced 2024-11-23 00:23:48 +01:00
organizing sqlite3 stuff to support postgres (#46)
This commit is contained in:
parent
6148fe316d
commit
bc75b312bf
@ -1,6 +0,0 @@
|
||||
package sql
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.sql
|
||||
var Fs embed.FS
|
6
controller/store/sql/sqlite3/embed.go
Normal file
6
controller/store/sql/sqlite3/embed.go
Normal file
@ -0,0 +1,6 @@
|
||||
package sqlite3_schema
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.sql
|
||||
var FS embed.FS
|
@ -5,7 +5,7 @@ import (
|
||||
"github.com/iancoleman/strcase"
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/openziti-test-kitchen/zrok/controller/store/sql"
|
||||
sqlite3_schema "github.com/openziti-test-kitchen/zrok/controller/store/sql/sqlite3"
|
||||
"github.com/pkg/errors"
|
||||
migrate "github.com/rubenv/sql-migrate"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -52,7 +52,7 @@ func (self *Store) Close() error {
|
||||
|
||||
func (self *Store) migrate() error {
|
||||
migrations := &migrate.EmbedFileSystemMigrationSource{
|
||||
FileSystem: sql.Fs,
|
||||
FileSystem: sqlite3_schema.FS,
|
||||
Root: "/",
|
||||
}
|
||||
migrate.SetTable("migrations")
|
||||
|
Loading…
Reference in New Issue
Block a user