22 lines
325 B
Go
Raw Permalink Normal View History

2025-01-25 18:33:11 +08:00
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
}