diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 76117a48730901331b3f87e324ce4dcff8e29224..9f3cb61398d142fb73178c06395772811349cc26 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -285,10 +285,13 @@ migration paths:
     - git checkout HEAD .
     - git fetch --tags
     - git checkout v8.5.9
+    - mv config/resque.yml config/resque.yml.new
     - 'echo test: unix:/var/opt/gitlab/redis/redis.socket > config/resque.yml'
     - bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" --retry=3
     - rake db:drop db:create db:schema:load db:seed_fu
     - git checkout $CI_BUILD_REF
+    - rm config/resque.yml
+    - mv config/resque.yml.new config/resque.yml
     - rake db:migrate
 
 coverage: