Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIDFunc ¶
DefaultIDFunc is the default IDFunc used by the migrator. It expects the filename to be in the YYYYMMDDHHMMSS_<description>.sql format and defines the ID as the number of seconds since 2023-01-01 00:00:00 UTC.
Types ¶
type IDFunc ¶
IDFunc defines a function that validates the migration filename and extracts its numeric ID. The ID must be unique and increasing with each new migration.
type LogFunc ¶
LogFunc defines a function used to log the migration process. attrs is a list of key-value pairs, where the key is a string.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func (*Migrator) WithIDFunc ¶
func (*Migrator) WithLogFunc ¶
Click to show internal directories.
Click to hide internal directories.