2021-08-03 02:08:50 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class ApplicationRecord < ::ApplicationRecord
|
|
|
|
self.abstract_class = true
|
|
|
|
|
2021-11-02 23:13:15 -04:00
|
|
|
if Gitlab::Database.has_config?(:ci)
|
|
|
|
connects_to database: { writing: :ci, reading: :ci }
|
|
|
|
end
|
|
|
|
|
2021-08-03 02:08:50 -04:00
|
|
|
def self.table_name_prefix
|
|
|
|
'ci_'
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.model_name
|
|
|
|
@model_name ||= ActiveModel::Name.new(self, nil, self.name.demodulize)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|