package initialize

import (
	"context"
	"fmt"
	"{{.Module}}/internal/data"
	"github.com/go-kratos/kratos/v2/log"
	"github.com/pkg/errors"
)

func Gorm(ctx context.Context) {
	err := data.DB.WithContext(ctx).AutoMigrate()
	if err != nil {
		err = errors.Wrap(err, "注册表失败!")
		log.Error(fmt.Sprintf("%+v", err))
	}
}
