Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 21:09:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 21:09:35 +0300
commit5bfb8d1fad825eec90b0af688c7cd1b352c9056e (patch)
tree385411919c4186d11a769385ad8dafeef6cc36a7 /db/migrate/20181016141739_add_status_to_deployments.rb
parentaaf59610548d9b0fd01acfd50e831cbe519ecba2 (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.rb6
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)