mysql> ALTER TABLE dns_domains DROP PRIMARY KEY;
ERROR 1025 (HY000): Error on rename of './nova/#sql-6cf_855' to './nova/dns_domains' (errno: 150)
mysql> desc dns_domains;
ERROR 1146 (42S02): Table 'nova.dns_domains' doesn't exist
----
What we'll need to do is create a new table, migration the data over, drop the old table, and then rename the new table to 'dns_domains'. Quite a mess!
Yeah. Looks like things are worse than I thought. We can't even cleanly drop this primary key:
mysql> desc dns_domains; ------- ------+ ------- ------- +------ +-----+ ------- --+---- ---+ ------- ------+ ------- ------- +------ +-----+ ------- --+---- ---+ ------- ------+ ------- ------- +------ +-----+ ------- --+---- ---+
+------
| Field | Type | Null | Key | Default | Extra |
+------
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| deleted | tinyint(1) | YES | | NULL | |
| domain | varchar(512) | NO | PRI | NULL | |
| scope | varchar(255) | YES | | NULL | |
| availability_zone | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | MUL | NULL | |
+------
8 rows in set (0.01 sec)
mysql> ALTER TABLE dns_domains DROP PRIMARY KEY; #sql-6cf_ 855' to './nova/ dns_domains' (errno: 150)
ERROR 1025 (HY000): Error on rename of './nova/
mysql> desc dns_domains;
ERROR 1146 (42S02): Table 'nova.dns_domains' doesn't exist
----
What we'll need to do is create a new table, migration the data over, drop the old table, and then rename the new table to 'dns_domains'. Quite a mess!