Skip to main content

Function: loadMigrationsFromDirectory()

loadMigrationsFromDirectory(directory): MigrationScript[]

Defined in: Data/Migration/loadMigrations.ts:23

Read and parse every migration in a directory, ordered by version.

Files that do not match NNN_name.sql are ignored, so README.md and scratch files can live alongside the migrations.

Parameters

directory

string

Path to packages/core/src/sql/migrations (or the copy of it that shipped with the build).

Returns

MigrationScript[]