Interface ReadSchemaMigrationsOptions

Options for reading a migrations folder.

interface ReadSchemaMigrationsOptions {
    dialect?: "sqlite" | "postgres";
    namePattern?: RegExp;
}

Properties

dialect?: "sqlite" | "postgres"

Reads <dir>/<dialect> when that folder exists, else <dir>.

namePattern?: RegExp

The file-name form, whose first capture group is the number that orders the file. Default: digits, an underscore, then lower-case letters, digits and underscores, .sql (001_init.sql, 0001_accounts.sql).