From 8fd0e2b96a89b03dcff88a5b4bac5e614b9e4f90 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 25 Feb 2024 15:56:19 -0500 Subject: Add Name func to Migration model --- internal/models/migration.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal') diff --git a/internal/models/migration.go b/internal/models/migration.go index 4007f3c..b63fec9 100644 --- a/internal/models/migration.go +++ b/internal/models/migration.go @@ -30,3 +30,7 @@ func NewSequentialMigration(version uint64, message string) *Migration { Applied: false, } } + +func (m *Migration) Name() string { + return fmt.Sprintf("%s_%s", m.Version, m.Message) +} -- cgit v1.2.3