Many tables in my built-in (PostgreSQL) EventSentry database have duplicate constraints, how can I delete them?

Article ID: 298
Category: Database
Applies to: 2.93 and higher
Updated: 2016-03-07

Due to a bug in the EventSentry configuration assistant, the EventSentry database (PostgreSQL only) may create duplicate constraints when updating a PostgreSQL database. These constraints can be removed by downloading and running a SQL script (see "Additional Links" below) from within pgAdmin:

  1. Open pgAdmin
  2. Click the SQL button from the toolbar
  3. Paste the contents of the SQL file into the "SQL Editor" window
  4. From the "Query" menu select "Execute pgScript" or simply press F6
  5. Ignore any WARNING or ERROR messages reported

Running this script is optional and only necessary once. As soon as you have upgraded to EventSentry v3.2.1.6 or higher, running the configuration assistant will no longer create duplicate constraints.