akvo / akvo-unified-log

Akvo Unified Log
Other
1 stars 0 forks source link

Use unique constraint in event_log.payload to avoid duplicate events #8

Closed iperdomo closed 8 years ago

iperdomo commented 8 years ago

As last resort the database must prevent inserting duplicated events in the log. An easy way to do it is to add a UNIQUE constraint in payload column.

See: http://www.postgresql.org/docs/current/static/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS