Puttin the schema name before the sequence name worked for me, changing from a postgres version to another broke my script and cause this errpr.