That's intended when the table has RLS. Realtime can't check RLS on a row that no longer exists, so for DELETE it only sends the primary key to avoid leaking deleted data to people who weren't allowed to see it. Replica identity full doesn't change that with RLS on.
You don't need the column id though. You already have all cards in state, so remove by id:
if (payload.eventType === 'DELETE') {
setCards((cards) => cards.filter((c) => c.id !== payload.old.id))
}If you keep cards grouped per column, keep a flat Map<id, card> next to it, or derive the columns from one flat list. Also worth knowing: DELETE events aren't filtered by RLS either, so every subscriber gets the ids of deleted cards. Ids only, but don't put anything meaningful in the id.
replica identity default. Full makes every update write more WAL, no point keeping it. jb_supa · edited