Make plan_limits.repository_size nullable

We need to make plan_limits.repository_size accepts nil values for 2 reasons:

  1. To act in accordance with application_settings.repository_size_limit, namespaces.repository_size_limit, and projects.repository_size_limit, which all are nullable
  2. Because the current business logic is:
    • if nil it means that there's no limit set
    • if 0 it's limitless
    • if > 0 then the limit is the number set.

The hierarchy will be as follows: projects.repository_size_limit > namespaces.repository_size_limit > plan_limits.repository_size > application_settings.repository_size_limit

So if a limit is set at a lower level (e.g. project) it takes precedence over the upper levels. In order for plan_limits.repository_size to participate in this hierarchy it needs to accept null values

Implementation

Edited by Sheldon Led