aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney
diff options
context:
space:
mode:
authorLucas Verney <phyks@phyks.me>2017-11-01 01:56:05 +0100
committerAlexis Metaireau <alexis@notmyidea.org>2017-11-01 01:56:05 +0100
commit04535997528125c294d0698e01eea2ff19f5af12 (patch)
tree0ff3f9ed03b1ea3b7b4ec0e17ddb14fafea22970 /ihatemoney
parentb94bad829c1fd4b4325a4af280d33d50f164e05f (diff)
downloadihatemoney-mirror-04535997528125c294d0698e01eea2ff19f5af12.zip
ihatemoney-mirror-04535997528125c294d0698e01eea2ff19f5af12.tar.gz
ihatemoney-mirror-04535997528125c294d0698e01eea2ff19f5af12.tar.bz2
Update installation doc to include doc about production values, fix #266. (#282)
Diffstat (limited to 'ihatemoney')
-rw-r--r--ihatemoney/run.py7
1 files changed, 7 insertions, 0 deletions
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