OptionalmigrationsFolder: stringAbsolute path to the consuming project's
migrations folder. Defaults to <cwd>/migrations.
OptionalbeforeMigrationScriptsPath: stringAbsolute path to this package's
migrations/before-migration directory. Optional override for callers that
want to resolve the package assets themselves.
When omitted, the package root is resolved internally in both the CJS and
ESM builds and the bundled migrations/before-migration directory is used.
Callers that need the explicit path can use getDbCommonBeforeMigrationPath:
import { getBeforeMigrationScripts, getDbCommonBeforeMigrationPath } from '@axinom/mosaic-db-common';
await getBeforeMigrationScripts(
migrationsFolder,
getDbCommonBeforeMigrationPath(import.meta.url),
);
Retrieves an array of relative string paths to before-migration SQL scripts, consumed by graphile-migrate settings. Scripts contain helper functions added to the
ax_utilsandax_defineschemas.