Commit 2ea0148c authored by Lin Jen-Shin's avatar Lin Jen-Shin

Update migration with add_column_with_default:

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12278454
parent 35954572
......@@ -2,7 +2,12 @@ class AddLockedToCiRunner < ActiveRecord::Migration
##
# Downtime expected due to exclusive lock when setting default value.
#
def change
add_column :ci_runners, :locked, :boolean, default: false, null: false
def up
add_column_with_default(:ci_runners, :locked, :boolean,
default: false, allow_null: false)
end
def down
remove_column(:ci_runners, :locked)
end
end
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