LittleSheep 4cf3742a75
Some checks failed
release-nightly / build-docker (push) Has been cancelled
🎉 Initial Commit
2025-01-25 18:33:11 +08:00

22 lines
325 B
Go

package database
import (
"git.solsynth.dev/hypernet/wallet/pkg/internal/models"
"gorm.io/gorm"
)
var AutoMaintainRange = []any{
&models.Wallet{},
&models.Transaction{},
}
func RunMigration(source *gorm.DB) error {
if err := source.AutoMigrate(
AutoMaintainRange...,
); err != nil {
return err
}
return nil
}