diff --git a/models/migrations/v1_20/v246.go b/models/migrations/v1_20/v246.go index a6dd4a6cf88d2..8395e7bca8ee9 100644 --- a/models/migrations/v1_20/v246.go +++ b/models/migrations/v1_20/v246.go @@ -37,7 +37,7 @@ func FixIncorrectProjectType(x *xorm.Engine) error { } count, err := sess.Table("project"). - Where("type = ? AND owner_id = (SELECT id FROM user WHERE type = ?)", TypeOrganization, UserTypeIndividual). + Where("type = ? AND owner_id IN (SELECT id FROM user WHERE type = ?)", TypeOrganization, UserTypeIndividual). Update(&Project{ Type: TypeIndividual, })