Commit 8fab37e3 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'sh-fix-generators-not-always-working' into 'master'

Fix "rails g migration" not always using migration templates

Closes #52651

See merge request gitlab-org/gitlab-ce!22592
parents 795c0e35 76c8041b
...@@ -98,7 +98,11 @@ end ...@@ -98,7 +98,11 @@ end
# check: https://github.com/rspec/rspec-mocks#settings-mocks-or-stubs-on-any-instance-of-a-class # check: https://github.com/rspec/rspec-mocks#settings-mocks-or-stubs-on-any-instance-of-a-class
# #
# Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/33587 # Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/33587
if Gitlab::Metrics.enabled? && !Rails.env.test? #
# In development mode, we turn off eager loading when we're running
# `rails generate migration` because eager loading short-circuits the
# loading of our custom migration templates.
if Gitlab::Metrics.enabled? && !Rails.env.test? && !(Rails.env.development? && defined?(Rails::Generators))
require 'pathname' require 'pathname'
require 'influxdb' require 'influxdb'
require 'connection_pool' require 'connection_pool'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment