diff --git a/initdb.py b/initdb.py index 456587220..c81e148f3 100644 --- a/initdb.py +++ b/initdb.py @@ -508,6 +508,10 @@ def populate_database(): if __name__ == '__main__': log_level = getattr(logging, app.config['LOGGING_LEVEL']) logging.basicConfig(level=log_level) + + if not isinstance(model.db.obj, SqliteDatabase): + raise RuntimeError('Attempted to initialize production database!') + initialize_database() if app.config.get('POPULATE_DB_TEST_DATA', False):