package registry

import (
	"database/sql"
	"embed"

	"fn-registry/functions/infra"
)

//go:embed migrations/*.sql
var migrationsFS embed.FS

// migrate applies pending migrations to the registry database via the
// registry's sqlite_apply_versioned_migrations_go_infra (schema_migrations
// tracking + per-file transactions).
func migrate(conn *sql.DB) error {
	return infra.ApplyVersionedMigrations(conn, migrationsFS, "migrations")
}
