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

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

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

  restrict_gitlab_migration gitlab_schema: :gitlab_main

  def up
    execute('DELETE FROM board_project_recent_visits WHERE user_id is null OR project_id is null OR board_id is null')
  end

  def down
    # no-op
  end
end