add previous schema for compat
This commit is contained in:
@ -4,7 +4,12 @@ import os
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
|
||||
app.config["DB_PATH"] = "data/db/db.sqlite"
|
||||
if os.getenv("PYROM_PROD") is None:
|
||||
app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")
|
||||
app.debug = True
|
||||
app.config["DB_PATH"] = "data/db/db.dev.sqlite"
|
||||
else:
|
||||
app.config["DB_PATH"] = "data/db/db.prod.sqlite"
|
||||
|
||||
os.makedirs(os.path.dirname(app.config["DB_PATH"]), exist_ok = True)
|
||||
with app.app_context():
|
||||
@ -13,10 +18,6 @@ def create_app():
|
||||
create_tables()
|
||||
run_migrations()
|
||||
|
||||
if os.getenv("PYROM_PROD") is None:
|
||||
app.static_folder = os.path.join(os.path.dirname(__file__), "../data/static")
|
||||
app.debug = True
|
||||
|
||||
from app.routes.app import bp as app_bp
|
||||
app.register_blueprint(app_bp)
|
||||
|
||||
|
Reference in New Issue
Block a user