debian-mirror-gitlab/db/migrate/20230509131736_add_default_organization.rb
2023-07-09 08:55:56 +05:30

16 lines
324 B
Ruby

# 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