Commit 866899de authored by Maxime Orefice's avatar Maxime Orefice

Add default value for file_store to PipelineArtifact

By adding a default value we no longer need to specify
the file_store during object creation. This is similar
to our current JobArtifact model.
parent a901c04b
---
title: Add default value for file_store to ci_pipeline_artifacts
merge_request: 39349
author:
type: fixed
# 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
c45bbd5aa9143e039d41448f1cb4a2e8e0a7b2c165b50e89b1b829bbbe81f137
\ No newline at end of file
......@@ -10061,7 +10061,7 @@ CREATE TABLE public.ci_pipeline_artifacts (
pipeline_id bigint NOT NULL,
project_id bigint NOT NULL,
size integer NOT NULL,
file_store smallint NOT NULL,
file_store smallint DEFAULT 1 NOT NULL,
file_type smallint NOT NULL,
file_format smallint NOT NULL,
file text,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment