From de36faa0a7a2110c629fc569a79f41db71e8d873 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 22 Mar 2013 21:59:28 +0100 Subject: [PATCH] DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS DEVELOPERS --- couchpotato/core/_base/_core/__init__.py | 2 +- couchpotato/runner.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/couchpotato/core/_base/_core/__init__.py b/couchpotato/core/_base/_core/__init__.py index c8c3fda..4d1a684 100644 --- a/couchpotato/core/_base/_core/__init__.py +++ b/couchpotato/core/_base/_core/__init__.py @@ -70,7 +70,7 @@ config = [{ 'name': 'development', 'default': 0, 'type': 'bool', - 'description': 'Disables some checks/downloads for faster reloading.', + 'description': 'Enable this if you\'re developing, and NOT in any other case, thanks.', }, { 'name': 'data_dir', diff --git a/couchpotato/runner.py b/couchpotato/runner.py index de53848..0ae14ce 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -190,9 +190,12 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En version_control(db, repo, version = latest_db_version) current_db_version = db_version(db, repo) - if current_db_version < latest_db_version and not development: - log.info('Doing database upgrade. From %d to %d', (current_db_version, latest_db_version)) - upgrade(db, repo) + if current_db_version < latest_db_version: + if development: + log.error('There is a database migration ready, but you are running development mode, so it won\'t be used. If you see this, you are stupid. Please disable development mode.') + else: + log.info('Doing database upgrade. From %d to %d', (current_db_version, latest_db_version)) + upgrade(db, repo) # Configure Database from couchpotato.core.settings.model import setup