Our ./dspace database status script is an excellent way to determine if your database schema is up-to-date, etc. But, it could be improved to also check for required content within that schema, especially the following:
- Required groups (Anonymous and Administrator) exist
- Required registries (esp. 'dc' and 'eperson' registries) exist. If there is also a way to check if registries are up-to-date, that'd be nice (but that may not be easy to implement, at least currently).
These checks would help users to more easily validate installations/upgrades. Occasionally, we've hit scenarios where the database schemas are updated successfully, but group or registry updates (which are triggered as Flyway callbacks) later fail. These callback failures are only logged (in dspace.log), and the status script will report "success" (as Flyway does not validate that any callbacks also succeed).
- Required Groups creation callback: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/storage/rdbms/GroupServiceInitializer.java
- Required Registry population callback: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseRegistryUpdater.java