summary refs log blame commit diff
path: root/pkgs/servers/calibre-web/db-migrations.patch
blob: 87e63f7d95c2b764731fd097e048a3397ea08b3a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                 
diff --git a/cps/__init__.py b/cps/__init__.py
index 627cca0b..233bb2dd 100644
--- a/cps/__init__.py
+++ b/cps/__init__.py
@@ -87,6 +87,9 @@ db.CalibreDB.setup_db(config, cli.settingspath)
 
 calibre_db = db.CalibreDB()
 
+if os.environ.get('__RUN_MIGRATIONS_AND_EXIT'):
+    sys.exit(0)
+
 def create_app():
     app.wsgi_app = ReverseProxied(app.wsgi_app)
     # For python2 convert path to unicode