mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-19 12:03:50 +01:00
Bug 13454: Drop both foreign keys, indexes of ssh_keypairs and add again
Status 13454: resolved fixed Reviewed-By: Nitin
This commit is contained in:
parent
31fe8bd815
commit
034b5890e6
@ -151,6 +151,13 @@ public class Upgrade2213to2214 implements DbUpgrade {
|
||||
keys.add("fk_ssh_keypairs__domain_id");
|
||||
DbUpgradeUtils.dropKeysIfExist(conn, "ssh_keypairs", keys, true);
|
||||
|
||||
keys = new ArrayList<String>();
|
||||
keys.add("fk_ssh_keypair__account_id");
|
||||
keys.add("fk_ssh_keypair__domain_id");
|
||||
keys.add("fk_ssh_keypairs__account_id");
|
||||
keys.add("fk_ssh_keypairs__domain_id");
|
||||
DbUpgradeUtils.dropKeysIfExist(conn, "ssh_keypairs", keys, false);
|
||||
|
||||
try {
|
||||
PreparedStatement pstmt; pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`ssh_keypairs` ADD CONSTRAINT `fk_ssh_keypairs__account_id` FOREIGN KEY `fk_ssh_keypairs__account_id` (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE");
|
||||
pstmt.executeUpdate();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user