summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorAmit Rathi <amit@hypertrack.io>2018-11-20 17:58:10 +0530
committerAmit Rathi <amit@hypertrack.io>2018-11-20 17:58:10 +0530
commitc3bad68d1c7c96abaca1a11ffd0e7572d1a46db0 (patch)
tree7b76a35c2af714db61412e65621a47f2f328cb65 /db/migrate
parent3a3841bc8858a63d709ba343dd5513da16e7e450 (diff)
parentfa5900fb6b5bda6f8568319293575c3072e47505 (diff)
downloadgitlab-ce-c3bad68d1c7c96abaca1a11ffd0e7572d1a46db0.tar.gz
Merge branch 'master' into certmanager-temp
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20181112103239_drop_default_value_on_status_deployments.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
new file mode 100644
index 00000000000..a480c15e66b
--- /dev/null
+++ b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration
+ DOWNTIME = false
+ DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value
+
+ def up
+ change_column_default :deployments, :status, nil
+ end
+
+ def down
+ change_column_default :deployments, :status, DEPLOYMENT_STATUS_SUCCESS
+ end
+end