Maven VReg: Move the cache_validity_period column to the upstreams table

Context

In Maven virtual registry MVC (API only interactions) (&14137 - closed), we have the virtual_registries_packages_maven_registries database table that hosts the column cache_validity_period. This column holds the duration in hours after which the cache will be considered stale, and the registry should check for a fresh copy on the upstream.

In the beginning of the feature implementation, the motive to put this column in the registries table was the desire to avoid making users have to set up multiple similar periods for the many upstreams support. Later, with the idea of shared upstreams, it makes less sense to have the cache_validity_hours on the registry level. One registry could say that for upstream U, the cache is valid for 1.hour and a second registry could say 1.day for the exact same upstream U. We believe it isn't wise to allow such confusion or mix of settings.

So, we decided to move this column to the virtual_registries_packages_maven_upstreams table.

Edited by Moaz Khalifa