From dcb60203a360104bb398e3085fa542050efb66c3 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Fri, 19 Jun 2015 11:04:31 -0300 Subject: [PATCH] Add to legacy study --- legacy/scripts/{migrate.py => migration.py} | 0 legacy/scripts/study.py | 5 +++++ 2 files changed, 5 insertions(+) rename legacy/scripts/{migrate.py => migration.py} (100%) diff --git a/legacy/scripts/migrate.py b/legacy/scripts/migration.py similarity index 100% rename from legacy/scripts/migrate.py rename to legacy/scripts/migration.py diff --git a/legacy/scripts/study.py b/legacy/scripts/study.py index 7a900c626..f6897db31 100644 --- a/legacy/scripts/study.py +++ b/legacy/scripts/study.py @@ -1,5 +1,10 @@ from django.apps import apps +from migration_base import legacy_app + + for model in apps.get_app_config('legacy').get_models(): if 'ind_excluido' in [f.name for f in model._meta.fields]: print model, model.objects.values_list('ind_excluido', flat=True).distinct() + +legacy_models_without_ind_excluido = [m for m in legacy_app.models.values() if not any(f.name == 'ind_excluido' for f in m._meta.fields)]