From: tierno Date: Fri, 8 Jul 2016 11:34:24 +0000 (+0200) Subject: fixed database downgrade bug from v0.7 to v0.6 X-Git-Tag: v1.0.0~68 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F228%2F1;p=osm%2FRO.git fixed database downgrade bug from v0.7 to v0.6 Signed-off-by: tierno --- diff --git a/database_utils/migrate_mano_db.sh b/database_utils/migrate_mano_db.sh index 3364d4ff..86a3b77b 100755 --- a/database_utils/migrate_mano_db.sh +++ b/database_utils/migrate_mano_db.sh @@ -445,7 +445,6 @@ function downgrade_from_7(){ for table in datacenters datacenter_nets instance_nets instance_scenarios instance_vms instance_vnfs interfaces nets nfvo_tenants scenarios sce_interfaces sce_nets sce_vnfs tenants_datacenters vim_tenants vms vnfs uuids do echo -en " $table \r" - echo "ALTER TABLE $table ADD COLUMN created_at_ DOUBLE NOT NULL after created_at;" | $DBCMD || ! echo "ERROR. Aborted!" || exit -1 echo "ALTER TABLE $table ADD COLUMN created_at_ TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP after created_at;" | $DBCMD || ! echo "ERROR. Aborted!" || exit -1 echo "UPDATE $table SET created_at_=from_unixtime(created_at);" | $DBCMD || ! echo "ERROR. Aborted!" || exit -1 echo "ALTER TABLE $table DROP COLUMN created_at, CHANGE COLUMN created_at_ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;" | $DBCMD || ! echo "ERROR. Aborted!" || exit -1