DO $$
BEGIN
  IF NOT EXISTS (SELECT 1 FROM permissions WHERE code = 'user:password:reset:any') THEN
    RAISE EXCEPTION 'missing permission user:password:reset:any';
  END IF;
END $$;

