From: Eduardo Sousa Date: Thu, 27 Jun 2019 11:07:42 +0000 (+0100) Subject: Removing hardcode of database name in version 23 X-Git-Tag: v6.0.1^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0941ac6f63c8ad51ac833c690b9de0a9964e533a;p=osm%2FRO.git Removing hardcode of database name in version 23 Change-Id: I7b0f87b0e1580bdb7fb1e272a012311320b54618 Signed-off-by: Eduardo Sousa --- 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';" }