From 0941ac6f63c8ad51ac833c690b9de0a9964e533a Mon Sep 17 00:00:00 2001 From: Eduardo Sousa Date: Thu, 27 Jun 2019 12:07:42 +0100 Subject: [PATCH] Removing hardcode of database name in version 23 Change-Id: I7b0f87b0e1580bdb7fb1e272a012311320b54618 Signed-off-by: Eduardo Sousa --- database_utils/migrate_mano_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database_utils/migrate_mano_db.sh b/database_utils/migrate_mano_db.sh index c7d51f09..e9b08aa1 100755 --- a/database_utils/migrate_mano_db.sh +++ b/database_utils/migrate_mano_db.sh @@ -796,14 +796,14 @@ function downgrade_from_22(){ function upgrade_to_23(){ # echo " upgrade database from version 0.22 to version 0.23" echo " add column 'availability_zone' at table 'vms'" - sql "ALTER TABLE mano_db.vms ADD COLUMN availability_zone VARCHAR(255) NULL AFTER modified_at;" + sql "ALTER TABLE vms ADD COLUMN availability_zone VARCHAR(255) NULL AFTER modified_at;" sql "INSERT INTO schema_version (version_int, version, openmano_ver, comments, date) VALUES (23, '0.23', '0.5.20',"\ "'Changed type of ram in flavors from SMALLINT to MEDIUMINT', '2017-08-29');" } function downgrade_from_23(){ # echo " downgrade database from version 0.23 to version 0.22" echo " remove column 'availability_zone' from table 'vms'" - sql "ALTER TABLE mano_db.vms DROP COLUMN availability_zone;" + sql "ALTER TABLE vms DROP COLUMN availability_zone;" sql "DELETE FROM schema_version WHERE version_int='23';" } -- 2.25.1