MigrationName Module
Provides functions for validating migration names.
Functions and values
| Function or value |
Description
|
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 (-)
|
Full Usage:
MigrationName.Validate name
Parameters:
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.
|
Migrondi