The orchestration code uses SQL logger
It should have it's own logger. Ideally with using the hierarchy system,
that the Logging library provides, https://github.com/TwP/logging/blob/master/examples/hierarchies.rb
so that one could extract logging for the whole orchestration, or a part of it.
Refs #13772 - ensure ApplicationRecord is loaded soon enough
In `lib/core_extensions.rb` we define as `per_page` method, that gets
called by `will_paginate` at load time of the models. The issue is
we are using `Setting` model there, that inherits from the
`ApplicationRecord` but the `ApplicationRecord` is not loaded yet at
that time, which leads to Rails not knowings it's abstract class
and therefore expecting it to be a base for STI.
After this patch, we require the `ApplicationRecord` soon enough to make
sure it's present before using any other model.