Logger Service migration - AtlasOfLivingAustralia/documentation GitHub Wiki

The logger-service does not have yet a db migration tool (like flyway or liquibase) so if you are upgrading logger:

  • from and old logger version (< 4.0), you'll probably need to migrate the db manually:
    • Add the two new indexes of this commit.
    • Change this trigger (from % to localhost) of this commit. Or you'll get some errors like:
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute statement; uncategorized SQLException for SQL [n/a]; SQL state [HY000]; error code [1449]; The user specified as a definer ('logger_user'@'%') does not exist; nested exception is java.sql.SQLException: The user specified as a definer ('logger_user'@'%') does not exist`
        `at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89)`
        `at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)`
        `at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)`
(...)
        `at au.org.ala.logger.LogEvent.save(LogEvent.groovy)`
        `at au.org.ala.logger.LogEvent.save(LogEvent.groovy)`
        `at org.grails.datastore.gorm.GormEntity$save.call(Unknown Source)`
        `at au.org.ala.logger.LoggerService.$tt__createLog(LoggerService.groovy:52)`

You can use a db client like dbeaver.io.