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

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

class ModifyCiFinishedBuildsStartedAtDefaultToZero < ClickHouse::Migration
  def up
    execute <<~SQL
      ALTER TABLE ci_finished_builds MODIFY COLUMN started_at DEFAULT 0
    SQL
  end

  def down
    execute <<~SQL
      ALTER TABLE ci_finished_builds MODIFY COLUMN started_at DEFAULT COALESCE(finished_at, 0)
    SQL
  end
end