mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-01 18:01:40 +08:00
use just once during upgradedb otherwise frontend's request processing
is out of application context From docs: Setting a SERVER_NAME also by default enables URL generation without a request context but with an application context.
This commit is contained in:
@@ -15,7 +15,6 @@ class BaseConfiguration(object):
|
||||
dbdir, 'module_build_service.db'))
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
||||
# Where we should run when running "manage.py runssl" directly.
|
||||
SERVER_NAME = 'localhost'
|
||||
HOST = '127.0.0.1'
|
||||
PORT = 5000
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ def testpdc():
|
||||
def upgradedb():
|
||||
""" Upgrades the database schema to the latest revision
|
||||
"""
|
||||
app.config["SERVER_NAME"] = 'localhost'
|
||||
# TODO: configurable?
|
||||
migrations_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
||||
'migrations')
|
||||
|
||||
Reference in New Issue
Block a user