Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToApplyMigrations = errors.New("failed to apply migrations") ErrMissedDBConnection = errors.New("missed db connection") ErrUndefinedDBDriver = errors.New("undefined db driver") )
Predefined errors.
Functions ¶
func Run ¶
func Run(db *sql.DB, driver, migrationsTable, migrationsDir string, direction migrate.MigrationDirection) (int, error)
Run executes database migrations using the provided parameters. It takes a *sql.DB object, the database driver name, the name of the migrations table, the directory containing the migration files, and the migration direction. It returns the number of applied migrations and any error encountered.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.