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

20180115113902_add_project_creation_level_to_groups.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a10ce54087c7472ee34710b9c55ca72273453ee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class AddProjectCreationLevelToGroups < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    unless column_exists?(:namespaces, :project_creation_level)
      add_column(:namespaces, :project_creation_level, :integer)
    end
  end

  def down
    if column_exists?(:namespaces, :project_creation_level)
      remove_column(:namespaces, :project_creation_level, :integer)
    end
  end
end