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

13 lines
381 B
Ruby

# 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