Anyway to run EVENT TRIGGER on Supabase?

Use case: Let’s say I have 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();

But this requires superuser role
Was this page helpful?