summaryrefslogtreecommitdiff
path: root/glance/db/sqlalchemy/migrate_repo/versions/006_mysql_upgrade.sql
blob: e30e90a5392f6d4bf32fce0b4fd30ff87ecc474e (plain)
1
2
3
4
5
6
7
8
9
10
11
--
-- This file is necessary because MySQL does not support
-- renaming indexes.
--
DROP INDEX ix_image_properties_image_id_key ON image_properties;

-- Rename the `key` column to `name`
ALTER TABLE image_properties
CHANGE COLUMN `key` name VARCHAR(255) NOT NULL;

CREATE UNIQUE INDEX ix_image_properties_image_id_name ON image_properties (image_id, name);