When installing Confluence from scratch, additional constraints are not being added.
- PostgreSQL is being used as the database
- Configure PostgreSQL as per Database Setup for PostgreSQL
- Install Confluence as per Confluence Installation Guide
The following constraints/indexes should exist on the tables:
- cwd_unique_grp_attr unique
- cwd_unique_usr_attr unique
The above mentioned constraints are not present in the database.
WARNING: Make sure to back up the database before applying any SQL commands that modify the database, and ensure Confluence is not running while applying the change
For PostgreSQL, you can run the below SQL statements to add the missing constraints and indexes, assuming that the constraints haven't been broken in the mean time: