© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
1 reply
Karan

Anyway to run EVENT TRIGGER on Supabase?

Use case: Let’s say I have
schema_migrator
schema_migrator
role that’ll be creating the objects during ci/cd. So it's the owner, but I don’t want to have this role be able to truncate the tables. So I wanted to do:

CREATE EVENT TRIGGER on_ddl_end_trigger
  ON ddl_command_end
  WHEN TAG IN ('CREATE TABLE', 'CREATE TABLE AS', 'CREATE VIEW')
  EXECUTE FUNCTION on_ddl_end();
CREATE EVENT TRIGGER on_ddl_end_trigger
  ON ddl_command_end
  WHEN TAG IN ('CREATE TABLE', 'CREATE TABLE AS', 'CREATE VIEW')
  EXECUTE FUNCTION on_ddl_end();

But this requires superuser role
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to set claims on trigger supabase.
SupabaseSSupabase / help-and-questions
4y ago
is there anyway to set max_connections on local dev supabase?
SupabaseSSupabase / help-and-questions
3y ago
Unable to run supabase link
SupabaseSSupabase / help-and-questions
3mo ago
how to run a node js server on supabase
SupabaseSSupabase / help-and-questions
4y ago