diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9c4b4acbaf5a331e3f7e1a8225d14c8a250323f6..474bf6765f4106472e70d86421da3aae8e41ea81 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -279,16 +279,20 @@ bundler:audit:
 migration paths:
   stage: test
   <<: *use-db
+  variables:
+    SETUP_DB: "false"
   only:
     - master@gitlab-org/gitlab-ce
   script:
     - git checkout HEAD .
     - git fetch --tags
     - git checkout v8.5.9
-    - 'echo test: unix:/var/opt/gitlab/redis/redis.socket > config/resque.yml'
+    - cp config/resque.yml.example config/resque.yml
+    - sed -i 's/localhost/redis/g' 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
+    - source scripts/prepare_build.sh
     - rake db:migrate
 
 coverage: