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

20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 85e98d05d02b6188d61f4cb17427224f766fdc2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

class RestorePreviousSchemaWithoutLockVersionNullConstraint < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze

  disable_ddl_transaction!

  def up
    TABLES.each do |table|
      remove_not_null_constraint table, :lock_version
    end
  end

  def down
    # no-op
  end
end