debian-mirror-gitlab/app/models/ci/application_record.rb

20 lines
401 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module Ci
class ApplicationRecord < ::ApplicationRecord
self.abstract_class = true
2021-12-11 22:18:48 +05:30
if Gitlab::Database.has_config?(:ci)
connects_to database: { writing: :ci, reading: :ci }
end
2021-10-27 15:23:28 +05:30
def self.table_name_prefix
'ci_'
end
def self.model_name
@model_name ||= ActiveModel::Name.new(self, nil, self.name.demodulize)
end
end
end