🐛 Bug fixes on post freezed data didn't update

This commit is contained in:
2024-12-16 21:37:19 +08:00
parent ade3dbdeee
commit 710e2dc040
3 changed files with 11 additions and 9 deletions

View File

@ -10,13 +10,15 @@ var AutoMaintainRange = []any{
&models.Category{},
&models.Tag{},
&models.Post{},
&models.Reaction{},
&models.Subscription{},
}
func RunMigration(source *gorm.DB) error {
if err := source.AutoMigrate(
AutoMaintainRange...,
append(
AutoMaintainRange,
&models.Reaction{},
)...,
); err != nil {
return err
}