In order to support UUIDs, the new Service API refactor requires that the "pgcrypto" extension be installed in PostgreSQL.
- pgcrypto version 1.1 or above must be installed (usually it's in the "postgresql-contrib" package on Debian/Ubuntu servers)
- "CREATE EXTENSION pgcrypto;" must be run on the DSpace database to enable the extension on that database
We need to fully document this requirement, and even possibly put some checks in place to ensure the requirement has been met (as without this extension, DSpace will not function).
It might be possible to do some verification checks via Flyway and throw an immediate severe error as the database initializes. So, conceptually, Flyway should be able to do something like:
- Run "CREATE EXTENSION pgcrypto;" automatically on the DSpace database. If this throws an error, pgcrypto is not installed.
- Run "select installed_version from pg_available_extensions where name = 'pgcrypto';" to ensure that 1.1 or above is installed. If pgcrypto is <1.1, then it must be upgraded
- If either of the above fails, a severe error should be thrown with clear instructions regarding which requirement was not met.
- If both succeed, then pgcrypto should be fully installed/enabled and the correct version.