debian-mirror-gitlab/lib/gitlab/database/migration_helpers/announce_database.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
486 B
Ruby
Raw Normal View History

2022-07-23 23:45:48 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module MigrationHelpers
module AnnounceDatabase
extend ActiveSupport::Concern
def write(text = "")
if text.present? # announce/say
super("#{db_config_name}: #{text}")
else
super(text)
end
end
def db_config_name
@db_config_name ||= Gitlab::Database.db_config_name(connection)
end
end
end
end
end