This attempts to insert a temporary entry into each enum table until it succeeds. It re-synchronizes the postgres sequence generators with the max id of the table. Fixes #883 and #880
Fixes #637 Note: This PR does *not* actually raise the event; it merely adds support for it