Make plan_limits.repository_size nullable
We need to make plan_limits.repository_size accepts nil values for 2 reasons:
- To act in accordance with application_settings.repository_size_limit, namespaces.repository_size_limit, and projects.repository_size_limit, which all are nullable
- Because the current business logic is:
- if
nilit means that there's no limit set - if
0it's limitless - if
> 0then the limit is the number set.
- if
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