EUM upgrade from a version lower than 4.4 fails in the "schema update" step with the below error:
Unexpected error running Liquibase: Error executing SQL CREATE TABLE eum_db.crash_alert_events (hash_key VARCHAR(128) NOT NULL, range_key VARCHAR(128) NOT NULL, application_key VARCHAR(128) NOT NULL, alert_minute BIGINT(19) NOT NULL, group_id VARCHAR(128) NOT NULL, threshold INT(19) NOT NULL): Table 'crash_alert_events' already exists
For versions prior to 4.4, EUM has its database schema with Controller MySQL. Starting 4.4, EUM has its own database for a production mode. Hence, for a production mode installation, it is required to export the schema from the Controller database to the EUM MySQL database.
The EUM schema in 4.4 has some additional tables. When we import the dump as per the documented process, it drops the eum_db schema in MySQL of EUM and then imports the dump from the previous version. The update-schema then creates the tables that were missing in the previous version of schema.
If we are not using the recommended command to take the export, the tables that are different from the dump are not dropped during the import. Therefore, when we run the eum-schema update command, it fails with the above error. For example, we can take the database export using the below command as well: