add build scripts and resolve migration
This commit is contained in:
@@ -33,6 +33,8 @@ func Start(di *dig.Container) {
|
||||
func Migrate(db *gorm.DB) {
|
||||
logging.Info("Migrating database")
|
||||
|
||||
runMigrations(db)
|
||||
|
||||
err := db.AutoMigrate(
|
||||
&model.ServiceControlModel{},
|
||||
&model.Config{},
|
||||
@@ -66,6 +68,10 @@ func Migrate(db *gorm.DB) {
|
||||
func runMigrations(db *gorm.DB) {
|
||||
logging.Info("Running custom database migrations...")
|
||||
|
||||
if err := migrations.RunFixDDLCommentsMigration(db); err != nil {
|
||||
logging.Error("Failed to run DDL comment fix migration: %v", err)
|
||||
}
|
||||
|
||||
if err := migrations.RunPasswordSecurityMigration(db); err != nil {
|
||||
logging.Error("Failed to run password security migration: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user