Browse Source

Roda migrate junto com comando migracao_25_31

pull/1477/head
Marcio Mazza 7 years ago
parent
commit
057acefa79
  1. 2
      sapl/legacy/management/commands/migracao_25_31.py
  2. 5
      sapl/legacy/scripts/migra_um_db.sh

2
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'])

5
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

Loading…
Cancel
Save