Commit 0ccb04f4 authored by Sean Arnold's avatar Sean Arnold

Use with_lock_retries in migration

parent 2f7125e6
# frozen_string_literal: true
class AddIssueTypeToIssues < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
def up
with_lock_retries do
# Set default to issue type
add_column :issues, :issue_type, :integer, limit: 2, default: 0
add_column :issues, :issue_type, :integer, limit: 2, default: 0, null: false
end
end
def down
with_lock_retries do
remove_column :issues, :issue_type
end
end
end
9d30ae6ea32db6cbc5871e214a9c2bf8f1a37fbb586f5e39f6bc2ab58768607b
\ No newline at end of file
13731676720dd93887dc55374c9052f1087a2e817eb347fd63a19d9398899d75
\ No newline at end of file
......@@ -12529,6 +12529,7 @@ CREATE TABLE public.issues (
sprint_id bigint,
issue_type smallint DEFAULT 0,
CONSTRAINT check_fba63f706d CHECK ((lock_version IS NOT NULL))
issue_type smallint DEFAULT 0 NOT NULL
);
CREATE SEQUENCE public.issues_id_seq
......
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