Handing `created_at` and `updated_at`
I thought this would be trivial, but it turned out to be quite a headache. Can someone please teach or show me to do the following:
- Add RLS policy to prevent authenticated users from inserting rows with
updated_atand
values (it should just use the defaults:created_atNULLand
respectively)now() - Add RLS policy to prevent authenticated users from updating rows with (new)
updated_atand
valuescreated_at - Add a trigger that automatically updates
updated_atto
when a row gets updatednow()