Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Supabase JS missing "DELETE" event

Here is a snippet of my code

const subscription = supabase
            .from(`messages:channel_id=eq.${props.channelId}`)
            .on('INSERT', payload => addMessage(payload.new))
            .on('UPDATE', payload => updateMessage(payload.new))
            .on('DELETE', payload => removeMessage(payload.old))
            .subscribe()

with the messages table having enabled realtime as well as full replication with currently no RLS enabled for testing purposes.

But I only receive UPDATE and INSERT events, if I delete a row in the messages table, nothing happens (I don't receive any event when logging with console.log).

How can I also receive DELETE events?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want to receive "previous" data for updates and deletions, you will need to set REPLICA IDENTITY to FULL, like this: ALTER TABLE your_table REPLICA IDENTITY FULL;

if help everyone ;-)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!