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

20170127032550_remove_backlog_lists_from_boards.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0ee4229d1f833f07960ee6b65fbbf09024991250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class RemoveBacklogListsFromBoards < ActiveRecord::Migration
  DOWNTIME = false

  def up
    execute <<-SQL
      DELETE FROM lists WHERE list_type = 0;
    SQL
  end

  def down
    execute <<-SQL
      INSERT INTO lists (board_id, list_type, created_at, updated_at)
      SELECT boards.id, 0, NOW(), NOW()
      FROM boards;
    SQL
  end
end