func NewMigrator(db *sql.DB, log logger.Logger, migrations []*migrator.Migration) (*Migrator, error) {
	m, err := migrator.New(
		migrator.TableName(migrationTableV2),
		migrator.WithLogger(migratorLogger{log}),
		migrator.Migrations(convertMigrations(migrations)...),
	)
	if err != nil {
		return nil, err
	}
	return &Migrator{db, m}, nil
}
NewMigrator creates a new migrator and registers all migrations
package migrator
import (
	"context"
	"database/sql"
	"fmt"
	"github.com/lopezator/migrator"
	"github.com/ShoshinNikita/budget-manager/internal/logger"
	"github.com/ShoshinNikita/budget-manager/internal/pkg/errors"
)
const (
	migrationTableV1 = "migrations"
	migrationTableV2 = "migrations_v2"
)
type Migration = migrator.Migration
type Migrator struct {
	db *sql.DB
	m  *migrator.Migrator
}