added MigrateStructure to SetupCheck

split the MigrateStructure to be handled in each package seperately
This commit is contained in:
2025-01-02 21:42:20 +01:00
parent 33241f5cec
commit 87bae483d5
8 changed files with 161 additions and 0 deletions
+16
View File
@@ -18,3 +18,19 @@ func SaveCharacterToDB(character *Char) error {
return nil
})
}
func MigrateStructure() error {
err := database.DB.AutoMigrate(
&Eigenschaft{},
&Lp{},
&Ap{},
&B{},
&Merkmale{},
&Erfahrungsschatz{},
&Bennies{},
&Char{},
)
if err != nil {
return err
}
return nil
}