feat: Make STFS API public

Also: Happy new year :)
This commit is contained in:
Felix Pojtinger
2021-12-31 23:57:21 +01:00
parent ef364c836b
commit 67d97ed32b
32 changed files with 214 additions and 222 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ type SQLite struct {
DBPath string
Migrations migrate.MigrationSource
db *sql.DB
DB *sql.DB
}
func (s *SQLite) Open() error {
@@ -31,11 +31,11 @@ func (s *SQLite) Open() error {
// Configure the db
db.SetMaxOpenConns(1) // Prevent "database locked" errors
s.db = db
s.DB = db
// Run migrations if set
if s.Migrations != nil {
if _, err := migrate.Exec(s.db, "sqlite3", s.Migrations, migrate.Up); err != nil {
if _, err := migrate.Exec(s.DB, "sqlite3", s.Migrations, migrate.Up); err != nil {
return err
}
}