Skip to content

Don't rename system when migrating from 9.x -> 9.4

Bob Van Landuyt requested to merge bvl-rollback-renamed-system-namespace into master

What does this MR do?

Makes sure we don't rename the top level namespace called system when we don't need to.

Here's how the migrations have been adjusted:

Migrations

  1. 20170316163800_rename_system_namespaces.rb: Removed

  2. 20170316163845_move_uploads_to_system_dir.rb: Update the migration that moves the folders %w(user project note group appearance) to move them into -/system instead of system.

  3. 20170717074009_move_system_upload_folder.rb: Adjusted: don't move if the -/system directory already exists. as it would be with the updated version of 20170316163845

Post deployment migrations

  1. 20170317162059_update_upload_paths_to_system.rb: Updated to modify upload paths to the new -/system directory.

  2. 20170406111121_clean_upload_symlinks.rb: Make sure we clean/create the correct symlinks

  3. 20170606202615_move_appearance_to_system_dir.rb: Make sure it moves to the appearance folder to -/system although the mistate that required this should already be corrected.

  4. 20170612071012_move_personal_snippets_files.rb: Update to move to to -/system

  5. 20170613111224_clean_appearance_symlinks.rb: Updated to symlink the folders to the folders in -/system in the down path.

  6. 20170717111152_cleanup_move_system_upload_folder_symlink.rb: Stays in place, for people that did the migration step-by-step. It doesn't do anything if the symlink does not exist.

  7. 20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb: Stays in place for people that did the migration step-by-step.

TL;DR: Do the migration right the first time around: Don't rename system, move folders to the correct place. The old migrations stay in place, but don't do anything if the -/system directory exists.

  • Changelog entry added, if necessary
  • Tests
    • Updated for this feature/bug
    • All builds are passing
  • Review
    • Has been reviewed by Backend
    • Has been reviewed by Database

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/35525 Closes #36148

Edited by Bob Van Landuyt

Merge request reports

Loading