summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-12 15:30:40 +0100
committerRémy Coutable <remy@rymai.me>2018-02-12 16:54:22 +0100
commit957ae8734b6babc481e8f186de848ba1fe914c0e (patch)
tree6cda50ea4c94ebff9b5bbfe2b2422a1f0858b616 /db
parent1582fe782788b390c78ada258bb0e2f2b1a8f1c7 (diff)
downloadgitlab-ce-957ae8734b6babc481e8f186de848ba1fe914c0e.tar.gz
Fix a transient failure in db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb where symlink already existssh-no-cache-populate-migration
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
index 26b99b61424..c48f1c938d0 100644
--- a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
+++ b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb
@@ -20,7 +20,7 @@ class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration
def down
if File.directory?(new_directory)
say "Symlinking #{old_directory} -> #{new_directory}"
- FileUtils.ln_s(new_directory, old_directory)
+ FileUtils.ln_s(new_directory, old_directory) unless File.exist?(old_directory)
else
say "#{new_directory} doesn't exist, skipping."
end