feat: organizations and API keys
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
"embed"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/pressly/goose/v3"
|
||||
)
|
||||
|
||||
func SetupDB(driverName, url string) (*sqlx.DB, error) {
|
||||
@@ -25,3 +28,13 @@ func SetupDB(driverName, url string) (*sqlx.DB, error) {
|
||||
//
|
||||
// return goose.Up(db.DB, "migrations")
|
||||
//}
|
||||
|
||||
//go:embed event_store_migrations/*.sql
|
||||
var embedEventStoreMigrations embed.FS
|
||||
|
||||
func RunEventStoreMigrations(db *sqlx.DB) error {
|
||||
goose.SetTableName("goose_db_version_event")
|
||||
goose.SetBaseFS(embedEventStoreMigrations)
|
||||
|
||||
return goose.Up(db.DB, "event_store_migrations")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user