Browse Source

Cria command para tentar migração corretiva

migracao
Marcio Mazza 6 years ago
parent
commit
7c379e9999
  1. 8
      sapl/legacy/management/commands/tenta_correcao.py
  2. 3
      sapl/legacy/scripts/restaura_da_producao.sh

8
sapl/legacy/management/commands/tenta_correcao.py

@ -0,0 +1,8 @@
from django.core.management.base import BaseCommand
from sapl.legacy.migracao import tenta_correcao
class Command(BaseCommand):
def handle(self, *args, **options):
tenta_correcao()

3
sapl/legacy/scripts/restaura_da_producao.sh

@ -8,5 +8,4 @@ sudo -u postgres psql -c "CREATE DATABASE $1 WITH OWNER = sapl ENCODING = 'UTF8'
sudo -u postgres pg_restore -d $1 -U postgres "$HOME/migracao_sapl/dumps_producao/$1.prod"
echo "... restaurado"
DATABASE_NAME=$1 ./manage.py shell_plus --settings=sapl.legacy_migration_settings
# DATABASE_NAME=$1 ./manage.py shell_plus --settings=sapl.legacy_migration_settings

Loading…
Cancel
Save