debian-mirror-gitlab/db/migrate/20200811194848_add_default_value_for_file_store_to_pipeline_artifact.rb
2020-10-24 23:57:45 +05:30

21 lines
493 B
Ruby

# frozen_string_literal: true
class AddDefaultValueForFileStoreToPipelineArtifact < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
PIPELINE_ARTIFACT_LOCAL_FILE_STORE = 1
def up
with_lock_retries do
change_column_default :ci_pipeline_artifacts, :file_store, PIPELINE_ARTIFACT_LOCAL_FILE_STORE
end
end
def down
with_lock_retries do
change_column_default :ci_pipeline_artifacts, :file_store, nil
end
end
end