diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 21:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 21:09:35 +0300 |
commit | 5bfb8d1fad825eec90b0af688c7cd1b352c9056e (patch) | |
tree | 385411919c4186d11a769385ad8dafeef6cc36a7 /db/migrate/20181016141739_add_status_to_deployments.rb | |
parent | aaf59610548d9b0fd01acfd50e831cbe519ecba2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20181016141739_add_status_to_deployments.rb')
-rw-r--r-- | db/migrate/20181016141739_add_status_to_deployments.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/migrate/20181016141739_add_status_to_deployments.rb b/db/migrate/20181016141739_add_status_to_deployments.rb index 7aaf029b69c..103bd9cc56d 100644 --- a/db/migrate/20181016141739_add_status_to_deployments.rb +++ b/db/migrate/20181016141739_add_status_to_deployments.rb @@ -14,14 +14,18 @@ class AddStatusToDeployments < ActiveRecord::Migration[4.2] # Ideally, `status` column should not have default value because it should be leveraged by state machine (i.e. application level). # However, we have to use the default value for avoiding `NOT NULL` violation during the transition period. # The default value should be removed in the future release. + # rubocop:disable Migration/AddColumnWithDefault + # rubocop:disable Migration/UpdateLargeTable def up - add_column_with_default(:deployments, # rubocop:disable Migration/AddColumnWithDefault + add_column_with_default(:deployments, :status, :integer, limit: 2, default: DEPLOYMENT_STATUS_SUCCESS, allow_null: false) end + # rubocop:enable Migration/AddColumnWithDefault + # rubocop:enable Migration/UpdateLargeTable def down remove_column(:deployments, :status) |