🎨 Update project structure

This commit is contained in:
2024-06-16 23:24:54 +08:00
parent a1aa418496
commit 05a59113c9
28 changed files with 63 additions and 27 deletions

View File

@@ -0,0 +1,21 @@
package database
import (
"git.solsynth.dev/hydrogen/paperclip/pkg/models"
"gorm.io/gorm"
)
var AutoMaintainRange = []any{
&models.Account{},
&models.Attachment{},
}
func RunMigration(source *gorm.DB) error {
if err := source.AutoMigrate(
AutoMaintainRange...,
); err != nil {
return err
}
return nil
}