-- Add column to distinguish what entity this is, currently either VM or TEMPLATE.
SELECT fn_db_add_column('vm_static', 'entity_type', 'VARCHAR(32)');

-- Add specific templates columns to vm_static.
SELECT fn_db_add_column('vm_static', 'child_count', 'INTEGER DEFAULT 0');
SELECT fn_db_add_column('vm_static', 'template_status', 'INTEGER');

-- Add the internal_drive_mapping field to image_templates since we don't want it in image_vm_map.
SELECT fn_db_add_column('image_templates', 'internal_drive_mapping', 'VARCHAR(50)');


Add template columns to vm_static
backend: Add template columns to vm_static

Add columns from templae table to vm_static table, in order to merge the
two tables and get rid of the redundant template and sattelite tables.

Change-Id: I7dea426c1275bd377b71b42931aa7985bad4d8b7
