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

20220531233600_remove_sse_usage_data_from_redis.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7b02e483df75b0c11f7a57edf8d78e5b7d3d668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class RemoveSseUsageDataFromRedis < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  def up
    Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_VIEWS") }
    Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_COMMITS") }
    Gitlab::Redis::SharedState.with { |r| r.del("USAGE_STATIC_SITE_EDITOR_MERGE_REQUESTS") }
  end

  def down
    # no-op
  end
end