From b018a07f93cfac60920b8b74112968d9e4c36998 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Tue, 16 Jul 2019 13:12:38 +0200 Subject: [PATCH] db-migration: we run cleanup of cache keys AFTER upgrade. - this allows actually migrating CacheKeys - this step is optional, and it it fails it's not the end of the world, we still would run migration anyway. --- rhodecode/lib/db_manage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py index c4abb131..ddec86bd 100644 --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -117,7 +117,7 @@ class DbManage(object): self.sa.add(ver) log.info('db version set to: %s', __dbversion__) - def run_pre_migration_tasks(self): + def run_post_migration_tasks(self): """ Run various tasks before actually doing migrations """ @@ -172,7 +172,6 @@ class DbManage(object): notify(msg) - self.run_pre_migration_tasks() if curr_version == __dbversion__: log.info('This database is already at the newest version') @@ -194,6 +193,7 @@ class DbManage(object): _step = step + self.run_post_migration_tasks() notify('upgrade to version %s successful' % _step) def fix_repo_paths(self):