Module: Gitlab::DatabaseImporters::DefaultOrganizationImporter

Defined in:
lib/gitlab/database_importers/default_organization_importer.rb

Class Method Summary collapse

Class Method Details

.create_default_organizationObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gitlab/database_importers/default_organization_importer.rb', line 6

def self.create_default_organization
  return if Organizations::Organization.default_organization

  # When adding or changing attributes, consider changing the factory for Organization model as well
  # spec/factories/organizations/organizations.rb
  Organizations::Organization.create!(
    id: Organizations::Organization::DEFAULT_ORGANIZATION_ID,
    name: 'Default',
    path: 'default'
  )
end