summaryrefslogtreecommitdiff
path: root/db/migrate/20230509085428_change_organizations_sequence.rb
blob: 59ec8c6e1ea78df0d6e2893eaa4f99d19efd19fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class ChangeOrganizationsSequence < Gitlab::Database::Migration[2.1]
  def up
    # Modify sequence for organizations.id so id '1' is never automatically taken
    execute "ALTER SEQUENCE organizations_id_seq START WITH 1000 MINVALUE 1000 RESTART"
  end

  def down
    execute "ALTER SEQUENCE organizations_id_seq START WITH 1 MINVALUE 1"
  end
end