Skip to content

Switch legacy_open_source_license_available for non-public projects

What does this MR do and why?

Set the project_settings.legacy_open_source_license_available attribute to false for all the existing non-public projects (visibility_level != 20). See the linked issue for more detail.

When a project's visibility is changed from public to private or vice-versa we update this attribute to false.

Migration output

up

bin/rails db:migrate:up:main VERSION=20220520040416
WARNING: This version of GitLab depends on gitlab-shell 14.6.1, but you're running 14.5.0. Please update gitlab-shell.
== 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrating
-- transaction_open?()
   -> 0.0000s
== 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrated (0.0315s)

down

bin/rails db:migrate:down:main VERSION=20220520040416
WARNING: This version of GitLab depends on gitlab-shell 14.6.1, but you're running 14.5.0. Please update gitlab-shell.
== 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: reverting
== 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: reverted (0.0165s)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #353225

Edited by Abdul Wadood

Merge request reports

Loading