Commit 9610d076 authored by Thong Kuah's avatar Thong Kuah

Migrate to Rails 6.1 connection handling

This is required so that we can start using the Rails 6.1 connected_to
APIs. e.g. Ci.connected_to(role: :reading)
parent 8ad73f18
......@@ -165,6 +165,10 @@ module Gitlab
# like if you have constraints or database-specific column types
config.active_record.schema_format = :sql
# Use new connection handling so that we can use Rails 6.1+ multiple
# database support.
config.active_record.legacy_connection_handling = false
config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
# Enable the asset pipeline
......
......@@ -54,6 +54,9 @@ Rails.application.configure do
# Enable serving of images, stylesheets, and JavaScripts from an asset server
config.action_controller.asset_host = ENV['GITLAB_CDN_HOST'] if ENV['GITLAB_CDN_HOST'].present?
# We use a env var to keep at old default until we enable this for GitLab.com
config.active_record.legacy_connection_handling = !Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_RAILS_61_CONNECTION_HANDLING', false))
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
......
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