debian-mirror-gitlab/db/migrate/20230509085428_change_organizations_sequence.rb

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

13 lines
381 B
Ruby
Raw Normal View History

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