Working with this auction logic - https://dbfiddle.uk/?rdbms=postgres_13&fiddle=c6fb2b91380daaaacb8d1d985fb6b3e4 - but need this to work on Supabase, in particular the supabase Graphql. The issue is, to work in the graphql the auction_bid table needs a key.
Send email when outbid - following on from the above, and using https://github.com/burggraf/supabase-mailer - when a user is outbid, we'd like to send them an email
When a product is purchased, there needs to be a trigger that will update the orders table.
Then, would like to add a customized version of https://raphael.medaer.me/2019/06/12/pgfsm.html
Then, there is securing - adding row level security where needed