Header menu logo Migrondi

Migration Type

Object that represents an SQL migration file on disk, and are often used provide more context or information while logging information about migrations.

Record fields

Record Field Description

downContent

Full Usage: downContent

Field type: string

the actual SQL statements that will be used to run against the database when rolling back migrations from the database

Field type: string

manualTransaction

Full Usage: manualTransaction

Field type: bool
Field type: bool

name

Full Usage: name

Field type: string
Field type: string

timestamp

Full Usage: timestamp

Field type: int64
Field type: int64

upContent

Full Usage: upContent

Field type: string

the actual SQL statements that will be used to run against the database

Field type: string

Static members

Static member Description

Migration.ExtractFromFilename(filename)

Full Usage: Migration.ExtractFromFilename(filename)

Parameters:
    filename : string - The filename to extract the migration information from

Returns: Validation<(string * int64), string> A Result that may contain a tuple of the migration name and timestamp or a set of strings that may represent all of the found errors while validating the filename

Takes a filename and tries to extract the migration information from it

filename : string

The filename to extract the migration information from

Returns: Validation<(string * int64), string>

A Result that may contain a tuple of the migration name and timestamp or a set of strings that may represent all of the found errors while validating the filename

Migration.ExtractFromPath(path)

Full Usage: Migration.ExtractFromPath(path)

Parameters:
    path : string - The path to extract the migration information from

Returns: Validation<(string * int64), string> A Result that may contain a tuple of the migration name and timestamp or a set of strings that may represent all of the found errors while validating the path

Takes a path and tries to extract the migration information from it

This is mostly an utility function as internally calls `ExtractFromFilename` with System.IO's `Path.GetFileName`

path : string

The path to extract the migration information from

Returns: Validation<(string * int64), string>

A Result that may contain a tuple of the migration name and timestamp or a set of strings that may represent all of the found errors while validating the path

Type something to start searching.