Feat v0.9.4 package adoption roles (#78)
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m55s
CI/CD / test-sqlite (push) Successful in 3m7s
CI/CD / build-and-deploy (push) Successful in 1m19s
All checks were successful
CI/CD / detect-changes (push) Successful in 3s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m55s
CI/CD / test-sqlite (push) Successful in 3m7s
CI/CD / build-and-deploy (push) Successful in 1m19s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #78.
This commit is contained in:
@@ -591,6 +591,18 @@ func (h *PackageHandler) registerPackage(c *gin.Context, pkgID string, mInfo *Ma
|
||||
if err := h.stores.Packages.Update(c.Request.Context(), pkgID, pkg); err != nil {
|
||||
log.Printf("[packages] Failed to update package metadata for %s: %v", pkgID, err)
|
||||
}
|
||||
|
||||
// v0.9.4: persist adoptable flag (Update doesn't cover it — separate column)
|
||||
if mInfo.Adoptable {
|
||||
q := `UPDATE packages SET adoptable = true WHERE id = $1`
|
||||
if !database.IsPostgres() {
|
||||
q = `UPDATE packages SET adoptable = 1 WHERE id = ?`
|
||||
}
|
||||
if _, err := database.DB.ExecContext(c.Request.Context(), q, pkgID); err != nil {
|
||||
log.Printf("[packages] Failed to set adoptable for %s: %v", pkgID, err)
|
||||
}
|
||||
}
|
||||
|
||||
return preservedEnabled, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user