✨ Able to read wordpress site
btw the 10 yrs ago package still work properly, amazing...
means the wordpress api did not change a lot and the golang backward
compability is amazing!
22 lines
327 B
Go
22 lines
327 B
Go
package database
|
|
|
|
import (
|
|
"git.solsynth.dev/hypernet/reader/pkg/internal/models"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
var AutoMaintainRange = []any{
|
|
&models.LinkMeta{},
|
|
&models.NewsArticle{},
|
|
}
|
|
|
|
func RunMigration(source *gorm.DB) error {
|
|
if err := source.AutoMigrate(
|
|
AutoMaintainRange...,
|
|
); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|