2020-03-09 13:42:32 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module MigrationHelpers
|
|
|
|
module NamespacesHelpers
|
|
|
|
def create_namespace(name, visibility, options = {})
|
2021-01-03 14:25:43 +05:30
|
|
|
table(:namespaces).create!({
|
2020-03-09 13:42:32 +05:30
|
|
|
name: name,
|
|
|
|
path: name,
|
|
|
|
type: 'Group',
|
|
|
|
visibility_level: visibility
|
|
|
|
}.merge(options))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|