-- Upgrade script for disks.
UPDATE disks
SET disk_alias = vm_name || '_DISK' || disks.internal_drive_mapping
FROM vm_static, images, vm_device
WHERE vm_device.vm_id = vm_static.vm_guid
  AND vm_device.device_id = images.image_group_id
  AND disks.disk_id = images.image_group_id
  AND disks.disk_alias IS NULL;

Add upgrade script for disk alias
core: Add upgrade script for disk alias

Adding an upgrade script for nitialization of disk alias name.
Each disk will be generated with disk alias which will be combined with
the vm name it is associated with and its internal drive mappping.

This change is part of the upgrade process for changing disk to be
entity object with name and description.

Change-Id: I65b411896cba2803ed9009e873441349093478a3
