debian-mirror-gitlab/db/migrate/20230509131736_add_default_organization.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
324 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# 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