Header menu logo Migrondi

MigrationName Module

Provides functions for validating migration names.

Functions and values

Function or value Description

MigrationName.MetadataValuePattern

Full Usage: MigrationName.MetadataValuePattern

Returns: string

The regex pattern for valid metadata values in migration files. This pattern is used to validate migration names and other metadata values. Valid characters are: a-z, A-Z, 0-9, underscore (_), and hyphen (-)

Returns: string

MigrationName.Validate name

Full Usage: MigrationName.Validate name

Parameters:
    name : string - The migration name to validate

Returns: Result<string, string> Ok with the name if valid, Error with error message if invalid

Validates a migration name against the allowed character set. Migration names must match the pattern [a-zA-Z0-9_-]+ to be compatible with the Migrondi metadata format.

name : string

The migration name to validate

Returns: Result<string, string>

Ok with the name if valid, Error with error message if invalid

Type something to start searching.