forked from 0x2620/pandora
remove syncdb from db update
This commit is contained in:
parent
3f02f6086a
commit
7cbfc21027
1 changed files with 5 additions and 15 deletions
12
update.py
12
update.py
|
@ -89,21 +89,11 @@ def get_version(path):
|
||||||
if __name__ == "__main__":
|
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'))
|
||||||
if get('./manage.py', 'south_installed').strip() == 'yes':
|
|
||||||
run('./manage.py', 'syncdb')
|
|
||||||
print('\nRunning "./manage.py migrate"\n')
|
print('\nRunning "./manage.py migrate"\n')
|
||||||
run('./manage.py', 'migrate')
|
run('./manage.py', 'migrate', '--noinput')
|
||||||
run('./manage.py', 'sqlfindindex')
|
run('./manage.py', 'sqlfindindex')
|
||||||
run('./manage.py', 'sync_itemsort')
|
run('./manage.py', 'sync_itemsort')
|
||||||
reload_notice(base)
|
reload_notice(base)
|
||||||
else:
|
|
||||||
print("You are upgrading from an older version of pan.do/ra.")
|
|
||||||
print("Please use ./manage.py sqldiff -a to check for updates")
|
|
||||||
print("and apply required changes. You might have to set defaults too.")
|
|
||||||
print("Once done run:")
|
|
||||||
print("\tcd %s" % os.path.abspath(os.curdir))
|
|
||||||
print("\t./manage.py migrate --all --fake")
|
|
||||||
print("Check http://wiki.0x2620.org/wiki/pandora/DatabaseUpdate for more information")
|
|
||||||
elif len(sys.argv) == 2 and sys.argv[1] == 'static':
|
elif len(sys.argv) == 2 and sys.argv[1] == 'static':
|
||||||
os.chdir(join(base, 'pandora'))
|
os.chdir(join(base, 'pandora'))
|
||||||
run('./manage.py', 'update_static')
|
run('./manage.py', 'update_static')
|
||||||
|
|
Loading…
Reference in a new issue