My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/servers/calibre-web/db-migrations.patch

14 lines
401 B

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