Skip to content

callback functions after successful migration #52

@karstenkoehler

Description

@karstenkoehler

Hey, great work with this package so far. What I miss is a way to hook into a chain of migrations/rollbacks and execute some code after each successful migration. This could be used for example to report to current progress of the migrations.
What I have in mind is something like extending the Options struct as follows. The methods would be called after each migration step.

type Options struct {
	// ...
	AfterMigration func(m *Migration)
	AfterRollback func(m *Migration)
}

If you are happy with that change, I can provide a PR for it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions