Exemplare -> Items

This commit is contained in:
Simon Martens
2025-02-09 18:24:09 +01:00
parent 52239727d4
commit 28b3833228
5 changed files with 51 additions and 13 deletions

View File

@@ -0,0 +1,18 @@
package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
// add up queries...
return nil
}, func(app core.App) error {
// add down queries...
return nil
})
}

View File

@@ -66,10 +66,10 @@ func ItemsFromBändeAndBIBLIO(
}
}
var exemlist []dbmodels.Exemplar
var exemlist []dbmodels.Item
if band.BiblioID != 0 {
exem := dbmodels.Exemplar{Identifier: strconv.Itoa(band.BiblioID)}
exem := dbmodels.Item{Identifier: strconv.Itoa(band.BiblioID)}
if e, ok := biblio[band.BiblioID]; ok {
exem.Location = strings.TrimSpace(e.Standort)
exem.Condition = strings.TrimSpace(e.Zustand)
@@ -84,7 +84,7 @@ func ItemsFromBändeAndBIBLIO(
}
for nr, m := range t {
exem := dbmodels.Exemplar{Identifier: nr}
exem := dbmodels.Item{Identifier: nr}
no, err := strconv.Atoi(strings.TrimSpace(nr))
message := strings.TrimSpace(m)