Commit 6092681c authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'resolve_ci_base_class_confusion' into 'master'

Rename base model to avoid Rails getting the wrong ApplicationRecord

See merge request gitlab-org/gitlab!64979
parents 91e3aeba 42b582f4
......@@ -7,7 +7,7 @@ module Ci
# 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 ApplicationRecord < ::ApplicationRecord
class BaseModel < ::ApplicationRecord
self.abstract_class = true
if Gitlab::Database.has_config?(:ci)
......
# frozen_string_literal: true
module Ci
class InstanceVariable < ::Ci::ApplicationRecord
class InstanceVariable < ::Ci::BaseModel
extend Gitlab::Ci::Model
extend Gitlab::ProcessMemoryCache::Helper
include Ci::NewHasVariable
......
......@@ -95,7 +95,7 @@ database. This is to match the default name Rails has.
### Migrations
Any migrations that affect `Ci::ApplicationRecord` models
Any migrations that affect `Ci::BaseModel` models
and their tables must be placed in two directories for now:
- `db/migrate`
......
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