From be337d4f09c9fc901c85d2d615a3cdebbc039a33 Mon Sep 17 00:00:00 2001 From: lguohan Date: Thu, 14 Nov 2019 09:47:00 -0800 Subject: [PATCH] [bugfix]: allow loopback vrf migration from version 1_0_1 (#737) commit fe4446a4808bc98ca2b24b0a9afe822aaa50a7ce fix loopback vrf migration. but the commit does not enable db migration from version 1_0_1. Now, bump version 1_0_2 and allow db fix from 1_0_1 --- scripts/db_migrator.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index bb9c2a01935c..eefc2cbb30d0 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -35,7 +35,7 @@ def __init__(self, socket=None): none-zero values. build: sequentially increase within a minor version domain. """ - self.CURRENT_VERSION = 'version_1_0_1' + self.CURRENT_VERSION = 'version_1_0_2' self.TABLE_NAME = 'VERSIONS' self.TABLE_KEY = 'DATABASE' @@ -116,18 +116,26 @@ def version_unknown(self): # upgrade will take care of the subsequent migrations. self.migrate_pfc_wd_table() self.migrate_interface_table() - self.set_version('version_1_0_1') - return 'version_1_0_1' - + self.set_version('version_1_0_2') + return 'version_1_0_2' def version_1_0_1(self): """ - Current latest version. Nothing to do here. + Version 1_0_1. """ log_info('Handling version_1_0_1') + self.migrate_interface_table() + self.set_version('version_1_0_2') return None + def version_1_0_2(self): + """ + Current latest version. Nothing to do here. + """ + log_info('Handling version_1_0_2') + + return None def get_version(self): version = self.configDB.get_entry(self.TABLE_NAME, self.TABLE_KEY)