Postgres 13 does not support OR REPLACE for triggers.
** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near "TRIGGER"
query: CREATE OR REPLACE TRIGGER oban_workflow_trigger
AFTER DELETE ON "public".oban_jobs
FOR EACH ROW
WHEN (
OLD.state::text NOT IN ('cancelled', 'completed', 'discarded')
AND OLD.meta ? 'workflow_id'
)
EXECUTE FUNCTION "public".oban_workflow_cleanup();
Environment
elixir --version
): 1.16 OTP 26Current Behavior
Postgres 13 does not support
OR REPLACE
for triggers.Expected Behavior
Migration should work with Postgres 13.