mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-16 02:45:54 -07:00
Pre-release version v0.0.13 (#52)
* feat: search/merge items by id * feat: update track duration using musicbrainz * chore: changelog * fix: make username updates case insensitive * feat: add minutes listened to ui and fix image drop * chore: changelog * fix: embed db migrations (#37) * feat: Add support for ARM in publish workflow (#51) * chore: changelog * docs: search by id and custom theme support --------- Co-authored-by: potatoattack <lvl70nub@gmail.com> Co-authored-by: Benjamin Jonard <benjaminjonard@users.noreply.github.com>
This commit is contained in:
parent
5537b6fb89
commit
5419178012
32 changed files with 1252 additions and 100 deletions
|
|
@ -5,10 +5,9 @@ import (
|
|||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/gabehf/koito/db/migrations"
|
||||
"github.com/gabehf/koito/internal/cfg"
|
||||
"github.com/gabehf/koito/internal/db"
|
||||
"github.com/gabehf/koito/internal/repository"
|
||||
|
|
@ -54,13 +53,9 @@ func New() (*Psql, error) {
|
|||
return nil, fmt.Errorf("psql.New: failed to open db for migrations: %w", err)
|
||||
}
|
||||
|
||||
_, filename, _, ok := runtime.Caller(0)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("psql.New: unable to get caller info")
|
||||
}
|
||||
migrationsPath := filepath.Join(filepath.Dir(filename), "..", "..", "..", "db", "migrations")
|
||||
goose.SetBaseFS(migrations.Files)
|
||||
|
||||
if err := goose.Up(sqlDB, migrationsPath); err != nil {
|
||||
if err := goose.Up(sqlDB, "."); err != nil {
|
||||
return nil, fmt.Errorf("psql.New: goose failed: %w", err)
|
||||
}
|
||||
_ = sqlDB.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue