mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Use golang migrate for migrations
This commit is contained in:
@@ -12,6 +12,13 @@ import (
|
||||
_ "github.com/mattn/go-sqlite3" // SQLite driver
|
||||
)
|
||||
|
||||
type DBType string
|
||||
|
||||
const (
|
||||
DBTypeSQLite DBType = "sqlite3"
|
||||
DBTypePostgres DBType = "postgres"
|
||||
)
|
||||
|
||||
// UserStore defines the methods for interacting with user data in the database
|
||||
type UserStore interface {
|
||||
CreateUser(user *models.User) (*models.User, error)
|
||||
@@ -108,6 +115,7 @@ func getLogger() logging.Logger {
|
||||
type database struct {
|
||||
*sql.DB
|
||||
secretsService secrets.Service
|
||||
dbType DBType
|
||||
}
|
||||
|
||||
// Init initializes the database connection
|
||||
|
||||
Reference in New Issue
Block a user