From 95202456a6bad2a41344a065256fbc6be58057a2 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 24 Jun 2019 13:42:22 +0200 Subject: [PATCH] filter some output of migrate --- update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/update.py b/update.py index 671fb66e1..8639b8b83 100755 --- a/update.py +++ b/update.py @@ -58,7 +58,6 @@ def run(*cmd): p.wait() return p.returncode - def get(*cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, error = p.communicate() @@ -135,7 +134,10 @@ if __name__ == "__main__": if len(sys.argv) == 2 and sys.argv[1] in ('database', 'db'): os.chdir(join(base, 'pandora')) print('\nRunning "./manage.py migrate"\n') - run('./manage.py', 'migrate', '--noinput') + r = get('./manage.py', 'migrate', '--noinput') + r = r.replace("Your models have changes that are not yet reflected in a migration, and so won't be applied.", '') + r = r.replace("Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.", '') + print(r) run('./manage.py', 'sqlfindindex') run('./manage.py', 'sync_itemsort') run('./manage.py', 'sync_documentsort')