-- Direct-gift POINT has no consumer after Host period diamonds become the only gift-income path.
-- The predicate uses the removed template capability rather than app_code, so no runtime tenant branch is introduced.
-- wallet_policy_instances is a small configuration table; the delete is idempotent and never touches accounts or ledger rows.
DELETE FROM wallet_policy_instances
WHERE template_code = 'fami_guild_revenue_policy';

-- Remaining POINT policies keep only withdrawal/exchange parameters. Deprecated columns stay for rolling schema safety,
-- while every Admin-only section with no wallet consumer is removed from the runtime snapshot.
UPDATE wallet_policy_instances
SET host_point_ratio_ppm = 0,
    agency_point_ratio_ppm = 0,
    rule_json = JSON_REMOVE(
      rule_json,
      '$.allow_self_brushing',
      '$.google_coin_per_usd',
      '$.host.point_ratio_percent',
      '$.host.use_gift_type_ratio',
      '$.host.affects_room_heat',
	  '$.agency',
	  '$.agent',
	  '$.bd',
	  '$.manager',
	  '$.coin_seller',
	  '$.game_invite',
      '$.tasks'
    );
