organizing sqlite3 stuff to support postgres (#46)

This commit is contained in:
Michael Quigley 2022-10-21 08:36:43 -04:00
parent 6148fe316d
commit bc75b312bf
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
4 changed files with 8 additions and 8 deletions

View File

@ -1,6 +0,0 @@
package sql
import "embed"
//go:embed *.sql
var Fs embed.FS

View File

@ -0,0 +1,6 @@
package sqlite3_schema
import "embed"
//go:embed *.sql
var FS embed.FS

View File

@ -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")