diff --git a/sapl/legacy/migracao_dados.py b/sapl/legacy/migracao_dados.py index 9b7aecf86..ef96cb20a 100644 --- a/sapl/legacy/migracao_dados.py +++ b/sapl/legacy/migracao_dados.py @@ -1,4 +1,5 @@ import re +import traceback from collections import defaultdict from datetime import date from functools import lru_cache, partial @@ -724,6 +725,8 @@ class DataMigrator: dir_ocorrencias = DIR_RESULTADOS.child(date.today().isoformat()) dir_ocorrencias.mkdir(parents=True) self._do_migrate(obj) + except Exception as e: + ocorrencias['traceback'] = str(traceback.format_exc()) finally: # grava ocorrĂȘncias arq_ocorrencias = dir_ocorrencias.child( diff --git a/sapl/legacy/scripts/migra_um_db.sh b/sapl/legacy/scripts/migra_um_db.sh index 577a2c000..ed4db9662 100755 --- a/sapl/legacy/scripts/migra_um_db.sh +++ b/sapl/legacy/scripts/migra_um_db.sh @@ -39,7 +39,7 @@ if [ $# -ge 2 ]; then echo "--- MIGRACAO ---" | tee -a $LOG echo >> $LOG - DATABASE_NAME=$1 ./manage.py migracao_25_31 --force --settings sapl.legacy_migration_settings 2>&1 | tee -a $LOG + DATABASE_NAME=$1 ./manage.py migracao_25_31 --force --dados --settings sapl.legacy_migration_settings 2>&1 | tee -a $LOG echo >> $LOG else echo "USO:"