summaryrefslogtreecommitdiff
path: root/db/migrate/20180601213245_add_deploy_strategy_to_project_auto_devops.rb
blob: 6f50d428965efec9075957da95268e6fb6518aa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class AddDeployStrategyToProjectAutoDevops < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  # Set this constant to true if this migration requires downtime.
  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column_with_default :project_auto_devops, :deploy_strategy, :integer, default: 0, allow_null: false
  end

  def down
    remove_column :project_auto_devops, :deploy_strategy
  end
end