forked from 0x2620/pandora
filter some output of migrate
This commit is contained in:
parent
22210ebddb
commit
95202456a6
1 changed files with 4 additions and 2 deletions
|
@ -58,7 +58,6 @@ def run(*cmd):
|
||||||
p.wait()
|
p.wait()
|
||||||
return p.returncode
|
return p.returncode
|
||||||
|
|
||||||
|
|
||||||
def get(*cmd):
|
def get(*cmd):
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
stdout, error = p.communicate()
|
stdout, error = p.communicate()
|
||||||
|
@ -135,7 +134,10 @@ if __name__ == "__main__":
|
||||||
if len(sys.argv) == 2 and sys.argv[1] in ('database', 'db'):
|
if len(sys.argv) == 2 and sys.argv[1] in ('database', 'db'):
|
||||||
os.chdir(join(base, 'pandora'))
|
os.chdir(join(base, 'pandora'))
|
||||||
print('\nRunning "./manage.py migrate"\n')
|
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', 'sqlfindindex')
|
||||||
run('./manage.py', 'sync_itemsort')
|
run('./manage.py', 'sync_itemsort')
|
||||||
run('./manage.py', 'sync_documentsort')
|
run('./manage.py', 'sync_documentsort')
|
||||||
|
|
Loading…
Reference in a new issue