add build scripts and resolve migration
Some checks failed
Release and Deploy / build (push) Failing after 8m24s
Release and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-02-22 17:49:44 +01:00
parent 190e1a3a16
commit d62c8cef34
5 changed files with 257 additions and 33 deletions

View File

@@ -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)
}