21 lines
303 B
Go
21 lines
303 B
Go
|
package database
|
||
|
|
||
|
import (
|
||
|
"git.solsynth.dev/hydrogen/dealer/pkg/internal/models"
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
var AutoMaintainRange = []any{
|
||
|
&models.LinkMeta{},
|
||
|
}
|
||
|
|
||
|
func RunMigration(source *gorm.DB) error {
|
||
|
if err := source.AutoMigrate(
|
||
|
AutoMaintainRange...,
|
||
|
); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|