ALTER TABLE public.owner_ledger_entries ALTER COLUMN reference_id TYPE text USING reference_id::text;