feat(05-01): restructure fonoteka plugins into Winter directories
- Move models, classes, controllers, middleware, and updates into subpackages - Add self-registering models/updates/classes registries so later plans add files - Keep the genres route and shipped migration SQL unchanged
This commit is contained in:
15
updates/registry.go
Normal file
15
updates/registry.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package updates
|
||||
|
||||
import "github.com/go-gormigrate/gormigrate/v2"
|
||||
|
||||
var all []*gormigrate.Migration
|
||||
|
||||
// Register appends gormigrate steps so later plans add files without editing plugin.go.
|
||||
func Register(ms ...*gormigrate.Migration) {
|
||||
all = append(all, ms...)
|
||||
}
|
||||
|
||||
// All returns every migration registered by this plugin's updates package.
|
||||
func All() []*gormigrate.Migration {
|
||||
return all
|
||||
}
|
||||
Reference in New Issue
Block a user