Add a subgroup_creation_level column to the namespaces table
This commit is contained in:
parent
faa8b69f2b
commit
1044930a52
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddGroupCreationLevelToNamespaces < ActiveRecord::Migration[5.1]
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
DOWNTIME = false
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
unless column_exists?(:namespaces, :subgroup_creation_level)
|
||||
add_column_with_default(:namespaces, :subgroup_creation_level, :integer, default: 0)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
if column_exists?(:namespaces, :subgroup_creation_level)
|
||||
remove_column(:namespaces, :subgroup_creation_level)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue