Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Handing `created_at` and `updated_at` - Supabase
S
Supabase
•
13mo ago
•
3 replies
Revadike
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_at
updated_at
and
created_at
created_at
values
(it should just use the defaults
:
NULL
NULL
and
now()
now()
respectively
)
- Add RLS policy to prevent authenticated users from updating rows with
(new
)
updated_at
updated_at
and
created_at
created_at
values
- Add a trigger that automatically updates
updated_at
updated_at
to
now()
now()
when a row gets updated
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Why does my created_at column get updated?
S
Supabase / help-and-questions
3y ago
updated_at
S
Supabase / help-and-questions
4y ago
Automatically update updated_at timestampz
S
Supabase / help-and-questions
3y ago
How to update the updated_at field automatically
S
Supabase / help-and-questions
5mo ago