From 057acefa79abbec7f5666fa4933bdf576672fc3a Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Mon, 11 Sep 2017 16:50:21 -0300 Subject: [PATCH] Roda migrate junto com comando migracao_25_31 --- sapl/legacy/management/commands/migracao_25_31.py | 2 ++ sapl/legacy/scripts/migra_um_db.sh | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sapl/legacy/management/commands/migracao_25_31.py b/sapl/legacy/management/commands/migracao_25_31.py index bddb26a8c..c0e2fa352 100644 --- a/sapl/legacy/management/commands/migracao_25_31.py +++ b/sapl/legacy/management/commands/migracao_25_31.py @@ -1,3 +1,4 @@ +from django.core import management from django.core.management.base import BaseCommand from sapl.legacy import migration @@ -17,4 +18,5 @@ class Command(BaseCommand): ) def handle(self, *args, **options): + management.call_command('migrate') migration.migrate(interativo=not options['force']) diff --git a/sapl/legacy/scripts/migra_um_db.sh b/sapl/legacy/scripts/migra_um_db.sh index 26240d8d4..18f233414 100755 --- a/sapl/legacy/scripts/migra_um_db.sh +++ b/sapl/legacy/scripts/migra_um_db.sh @@ -14,11 +14,6 @@ echo "########################################" | tee -a $LOG echo >> $LOG -echo "--- DJANGO MIGRATE ---" | tee -a $LOG -echo >> $LOG -DATABASE_NAME=$1 ./manage.py migrate --settings sapl.legacy_migration_settings -echo >> $LOG - echo "--- MIGRACAO DE DADOS ---" | tee -a $LOG echo >> $LOG DATABASE_NAME=$1 ./manage.py migracao_25_31 -f --settings sapl.legacy_migration_settings |& tee -a $LOG