24 lines
644 B
Go
24 lines
644 B
Go
package data
|
|
|
|
import (
|
|
"kra/internal/data/migration"
|
|
datapayment "kra/internal/data/payment"
|
|
datasystem "kra/internal/data/system"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// migrateAll is the single data-layer migration entry point. Module-specific
|
|
// schema work stays with the module that owns its persistent objects.
|
|
func migrateAll(db *gorm.DB) error {
|
|
steps := []migration.Step{{
|
|
ID: "202608200001_data_infrastructure",
|
|
Migrate: func(db *gorm.DB) error {
|
|
return db.AutoMigrate(&integrationConfigPO{})
|
|
},
|
|
}}
|
|
steps = append(steps, datasystem.Migrations()...)
|
|
steps = append(steps, datapayment.Migrations()...)
|
|
return migration.Run(db, steps)
|
|
}
|