blob: a8c3a8ee69cffe8fd787aac8e05f9a6f94770fda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# frozen_string_literal: true
class AddActionToDeployments < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DEPLOYMENT_ACTION_START = 1 # Equivalent to Deployment.actions['start']
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default(:deployments,
:action,
:integer,
limit: 2,
default: DEPLOYMENT_ACTION_START,
allow_null: false)
end
def down
remove_column(:deployments, :action)
end
end
|