Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/base_model.rb')
-rw-r--r--app/models/ci/base_model.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/ci/base_model.rb b/app/models/ci/base_model.rb
new file mode 100644
index 00000000000..8fb752ead1d
--- /dev/null
+++ b/app/models/ci/base_model.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module Ci
+ # TODO: https://gitlab.com/groups/gitlab-org/-/epics/6168
+ #
+ # Do not use this yet outside of `ci_instance_variables`.
+ # This class is part of a migration to move all CI classes to a new separate database.
+ # Initially we are only going to be moving the `Ci::InstanceVariable` model and it will be duplicated in the main and CI tables
+ # Do not extend this class in any other models.
+ class BaseModel < ::ApplicationRecord
+ self.abstract_class = true
+
+ if Gitlab::Database.has_config?(:ci)
+ connects_to database: { writing: :ci, reading: :ci }
+ end
+ end
+end