Post-Migrator/services/migration/image-result.go

18 lines
534 B
Go
Raw Normal View History

2024-05-19 21:00:33 +00:00
package migration
import "database/sql"
type ImageResult struct {
WordpressId int
PostId int
OldUrl string
NewUrl string
IsSuccess bool
ErrorMessage string
}
func CreateImageResult(parameters ImageResult, db *sql.DB) error {
_, err := db.Exec("insert into ImageResults (PostId, WordpressId, OldUrl, NewUrl, IsSuccess, ErrorMessage) values (?, ?, ?, ?, ?, ?)", parameters.PostId, parameters.WordpressId, parameters.OldUrl, parameters.NewUrl, parameters.IsSuccess, parameters.ErrorMessage)
return err
}