From ed023db1aadeaa7543c2026e714981153c72f75c Mon Sep 17 00:00:00 2001 From: lins05 Date: Thu, 29 Jan 2015 12:58:54 +0800 Subject: [PATCH] add upgrade script for windows --- scripts/upgrade/win32/py/upgrade_3.1_4.0.py | 19 +++++++++++++++++++ scripts/upgrade/win32/upgrade_3.1_4.0.bat | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 scripts/upgrade/win32/py/upgrade_3.1_4.0.py create mode 100644 scripts/upgrade/win32/upgrade_3.1_4.0.bat diff --git a/scripts/upgrade/win32/py/upgrade_3.1_4.0.py b/scripts/upgrade/win32/py/upgrade_3.1_4.0.py new file mode 100644 index 000000000..acdda5362 --- /dev/null +++ b/scripts/upgrade/win32/py/upgrade_3.1_4.0.py @@ -0,0 +1,19 @@ +# coding: UTF-8 + +import os + +from upgrade_common import install_path, ccnet_dir, seafile_dir, upgrade_db, run_argv + +def main(): + try: + upgrade_db('4.0.0') + except Exception, e: + print 'Error:\n', e + else: + print '\ndone\n' + finally: + print '\nprint ENTER to exit\n' + raw_input() + +if __name__ == '__main__': + main() diff --git a/scripts/upgrade/win32/upgrade_3.1_4.0.bat b/scripts/upgrade/win32/upgrade_3.1_4.0.bat new file mode 100644 index 000000000..7b9afac7a --- /dev/null +++ b/scripts/upgrade/win32/upgrade_3.1_4.0.bat @@ -0,0 +1,4 @@ +@echo off +cd /d %~dp0 +set PYTHONPATH=%PYTHONPATH%;%~dp0\..\seahub\thirdpart +start python py/upgrade_3.1_4.0.py