Added announcement support and list migrations.

This commit is contained in:
Benjamin A. Shelton 2026-10-26 15:27:46 -06:00
commit c85a59d2ad
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
4 changed files with 52 additions and 9 deletions

View file

@ -18,3 +18,17 @@ func DoMigration(conf *settings.Settings) error {
return migrator.Up()
}
func ListMigrations(conf *settings.Settings) ([]string, error) {
mg, err := migratory.New(conf.System.DSN)
if err != nil {
return []string{}, err
}
mg.UsingVFS(conf.FS)
migrator, err := mg.Migrate("migrations/sqlite")
if err != nil {
return []string{}, err
}
return migrator.Migrations(), nil
}