From 04535997528125c294d0698e01eea2ff19f5af12 Mon Sep 17 00:00:00 2001 From: Lucas Verney Date: Wed, 1 Nov 2017 01:56:05 +0100 Subject: Update installation doc to include doc about production values, fix #266. (#282) --- ihatemoney/run.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ihatemoney') diff --git a/ihatemoney/run.py b/ihatemoney/run.py index 1d02405..e3a7c1e 100644 --- a/ihatemoney/run.py +++ b/ihatemoney/run.py @@ -28,6 +28,13 @@ def setup_database(app): alembic_setup = db.engine.dialect.has_table(con, 'alembic_version') return tables_exist and not alembic_setup + sqlalchemy_url = app.config.get('SQLALCHEMY_DATABASE_URI') + if sqlalchemy_url.startswith('sqlite:////tmp'): + warnings.warn( + 'The database is currently stored in /tmp and might be lost at ' + 'next reboot.' + ) + db.init_app(app) db.app = app -- cgit v1.1