From dd8ac9203b728b20e12c0a3300ef97ea6f99b76f Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Tue, 10 Apr 2018 13:15:41 -0300 Subject: [PATCH] =?UTF-8?q?Executa=20ajustes=20pr=C3=A9-migra=C3=A7=C3=A3o?= =?UTF-8?q?=20se=20existirem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/migracao_dados.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sapl/legacy/migracao_dados.py b/sapl/legacy/migracao_dados.py index f0bf710f0..9363e7464 100644 --- a/sapl/legacy/migracao_dados.py +++ b/sapl/legacy/migracao_dados.py @@ -782,6 +782,12 @@ def populate_renamed_fields(new, old): def migrar_dados(interativo=True): + # executa ajustes pré-migração, se existirem + arq_ajustes_pre_migracao = DIR_DADOS_MIGRACAO.child( + 'ajustes_pre_migracao', '{}.sql'.format(sigla_casa)) + if arq_ajustes_pre_migracao.exists(): + exec_legado(arq_ajustes_pre_migracao.read_file()) + uniformiza_banco() # excluindo database antigo.