2018-11-12 01:38:39 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-13 07:27:31 +00:00
|
|
|
class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration[4.2]
|
2018-11-12 01:38:39 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value
|
|
|
|
|
|
|
|
def up
|
2018-11-19 05:21:18 +00:00
|
|
|
change_column_default :deployments, :status, nil
|
2018-11-12 01:38:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
change_column_default :deployments, :status, DEPLOYMENT_STATUS_SUCCESS
|
|
|
|
end
|
|
|
|
end
|