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

20230509131736_add_default_organization.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a63e7171f539881efb6db3deb4bfceabe9bf33c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class AddDefaultOrganization < Gitlab::Database::Migration[2.1]
  restrict_gitlab_migration gitlab_schema: :gitlab_main

  class Organization < MigrationRecord
  end

  def up
    Organization.create(id: 1, name: 'Default')
  end

  def down
    Organization.where(id: 1).delete_all
  end
end