Commit 045c71aa authored by Kerri Miller's avatar Kerri Miller

Adds draft column to merge_requests table

parent 53a3dcf4
---
title: Add draft column to merge_requests table
merge_request: 61681
author:
type: other
# frozen_string_literal: true
class AddDraftColumnToMergeRequests < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "remove_concurrent_index"
# you must disable the use of transactions
# as these methods can not run in an existing transaction.
# When using "add_concurrent_index" or "remove_concurrent_index" methods make sure
# that either of them is the _only_ method called in the migration,
# any other changes should go in a separate migration.
# This ensures that upon failure _only_ the index creation or removing fails
# and can be retried or reverted easily.
#
# To disable transactions uncomment the following line and remove these
# comments:
# disable_ddl_transaction!
def up
with_lock_retries do
add_column :merge_requests, :draft, :boolean, default: false, null: false
end
end
def down
with_lock_retries do
remove_column :merge_requests, :draft
end
end
end
f2c85121d217aa953b6ae52e32624cf4164b1f1408bcbe8ae3facafc15b037ce
\ No newline at end of file
......@@ -14703,6 +14703,7 @@ CREATE TABLE merge_requests (
squash_commit_sha bytea,
sprint_id bigint,
merge_ref_sha bytea,
draft boolean DEFAULT false NOT NULL,
CONSTRAINT check_970d272570 CHECK ((lock_version IS NOT NULL))
);
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