Skip to content
Snippets Groups Projects
Commit 2ea0148c authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Update migration with add_column_with_default:

parent 35954572
No related branches found
No related tags found
2 merge requests!4734!4093 is giving me 502,!4093Make it possible to lock runner on a specific project
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment