1.3.0: ci: add first forgejo ci #1 #2

Merged
nicolas.boufideline merged 14 commits from #1 into main 2025-09-27 21:17:42 +00:00
Showing only changes of commit 3de726658f - Show all commits

1.3.0: go: add return check
Some checks failed
Test Pipeline / lint (pull_request) Failing after 40s
Test Pipeline / ci-test (pull_request) Successful in 4m32s

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
GnomeZworc 2025-09-26 02:37:24 +02:00
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632

View file

@ -15,7 +15,9 @@ func DropUnusedColumns(DB *gorm.DB, values ...interface{}) {
for _, dst := range values { for _, dst := range values {
stmt := &gorm.Statement{DB: DB} stmt := &gorm.Statement{DB: DB}
stmt.Parse(dst) if stmt.Parse(dst) != nil {
return
}
fields := stmt.Schema.Fields fields := stmt.Schema.Fields
columns, _ := DB.Debug().Migrator().ColumnTypes(dst) columns, _ := DB.Debug().Migrator().ColumnTypes(dst)
@ -28,7 +30,9 @@ func DropUnusedColumns(DB *gorm.DB, values ...interface{}) {
} }
} }
if !found { if !found {
DB.Migrator().DropColumn(dst, columns[i].Name()) if DB.Migrator().DropColumn(dst, columns[i].Name()) != nil {
return
}
} }
} }
} }