diff --git a/nextcloud/actions/upgrade b/nextcloud/actions/upgrade index 84133e9..fce3011 100755 --- a/nextcloud/actions/upgrade +++ b/nextcloud/actions/upgrade @@ -219,8 +219,9 @@ for image_version in "${upgrade_path[@]}"; do ## XXXvlab: this comes from and should move to onlyoffice charm in ## some way. - if grep "Update app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 && - grep "SQLSTATE" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1; then + if grep "Update app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 && ( + grep "SQLSTATE" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 || + grep "^Database error when running migration latest for app onlyoffice" "$MIGRATION_TMPDIR/migration.log" >/dev/null 2>&1 ); then if [ -e "$DATASTORE"/"$SERVICE_NAME/var/www/html/custom_apps/onlyoffice/lib/Migration/Version070400Date20220607111111.php" ]; then patch="$CHARM_PATH/../onlyoffice/src/patch/00-onlyoffice-nextcloud.patch"