From a9d51fd27207a54c839192577a921d8623124e77 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 2 Oct 2017 11:50:14 +0200 Subject: [PATCH] Fix database downgrade problem Change-Id: I7cd989aec2ff4237657bd72f61496e84e26d8879 Signed-off-by: tierno --- database_utils/migrate_mano_db.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/database_utils/migrate_mano_db.sh b/database_utils/migrate_mano_db.sh index c5d6ee64..d7a07550 100755 --- a/database_utils/migrate_mano_db.sh +++ b/database_utils/migrate_mano_db.sh @@ -1006,7 +1006,6 @@ function downgrade_from_26(){ } function upgrade_to_27(){ - # echo " upgrade database from version 0.26 to version 0.27" echo " Added 'encrypted_RO_priv_key','RO_pub_key' to table 'nfvo_tenants'" sql "ALTER TABLE nfvo_tenants ADD COLUMN encrypted_RO_priv_key VARCHAR(2000) NULL AFTER description;" sql "ALTER TABLE nfvo_tenants ADD COLUMN RO_pub_key VARCHAR(510) NULL AFTER encrypted_RO_priv_key;" @@ -1014,9 +1013,8 @@ function upgrade_to_27(){ sql "INSERT INTO schema_version (version_int, version, openmano_ver, comments, date) "\ "VALUES (27, '0.27', '0.5.25', 'Added encrypted_RO_priv_key,RO_pub_key to table nfvo_tenants', '2017-09-29');" } -function downgrade_from_26(){ - # echo " downgrade database from version 0.27 to version 0.26" - echo " Remove 'encrypted_RO_priv_key','RO_pub_key' to table 'nfvo_tenants'" +function downgrade_from_27(){ + echo " Remove 'encrypted_RO_priv_key','RO_pub_key' from table 'nfvo_tenants'" sql "ALTER TABLE nfvo_tenants DROP COLUMN encrypted_RO_priv_key;" sql "ALTER TABLE nfvo_tenants DROP COLUMN RO_pub_key;" sql "DELETE FROM schema_version WHERE version_int='27';" -- 2.25.1