diff options
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/0_license.rb | 2 | ||||
-rw-r--r-- | config/initializers/load_balancing.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/0_license.rb b/config/initializers/0_license.rb index 19c71c34904..5c4546f499f 100644 --- a/config/initializers/0_license.rb +++ b/config/initializers/0_license.rb @@ -10,7 +10,7 @@ Gitlab.ee do end # Needed to run migration - if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('licenses') + if Gitlab::Database.cached_table_exists?('licenses') message = LicenseHelper.license_message(signed_in: true, is_admin: true, in_html: false) if ::License.block_changes? && message.present? warn "WARNING: #{message}" diff --git a/config/initializers/load_balancing.rb b/config/initializers/load_balancing.rb index a49bcbe1f96..7502a6299ae 100644 --- a/config/initializers/load_balancing.rb +++ b/config/initializers/load_balancing.rb @@ -3,7 +3,7 @@ # We need to run this initializer after migrations are done so it doesn't fail on CI Gitlab.ee do - if ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('licenses') + if Gitlab::Database.cached_table_exists?('licenses') if Gitlab::Database::LoadBalancing.enable? Gitlab::Database.disable_prepared_statements |