-- Allow the configured Discord Server Booster role badge as a permanent grant.
-- Run after v47-reserved-bang-username.sql.

alter table public.profiles
  drop constraint if exists profiles_admin_badge_ids_allowed;

alter table public.profiles
  add constraint profiles_admin_badge_ids_allowed check (
    admin_badge_ids <@ array[
      'owner',
      'staff',
      'helper',
      'verified',
      'premium',
      'discord-server-booster',
      'donor',
      'og',
      'rich',
      'bug',
      'winner',
      'early',
      'founding100'
    ]::text[]
  );
