CLOUDSTACK-5976: Typo in "ssh_keypairs" table's foreign key constraints

on the Upgraded Setup
Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java
This commit is contained in:
Harikrishna Patnala 2014-05-05 20:32:44 +02:00 committed by Daan Hoogland
parent 2215fbf4c9
commit 5ccde5de93
1 changed files with 9 additions and 6 deletions

View File

@ -669,9 +669,11 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade {
//insert the keys anew
try {
PreparedStatement pstmt; pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`ssh_keypairs` ADD " +
"CONSTRAINT `fk_ssh_keypair__account_id` FOREIGN KEY `fk_ssh_keypair__account_id` (`account_id`)" +
" REFERENCES `account` (`id`) ON DELETE CASCADE");
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();
pstmt.close();
} catch (SQLException e) {
@ -679,9 +681,10 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade {
}
try {
PreparedStatement pstmt; pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`ssh_keypairs` ADD CONSTRAINT" +
" `fk_ssh_keypair__domain_id` FOREIGN KEY `fk_ssh_keypair__domain_id` (`domain_id`) " +
"REFERENCES `domain` (`id`) ON DELETE CASCADE");
PreparedStatement pstmt;
pstmt =
conn.prepareStatement("ALTER TABLE `cloud`.`ssh_keypairs` ADD CONSTRAINT"
+ " `fk_ssh_keypairs__domain_id` FOREIGN KEY `fk_ssh_keypairs__domain_id` (`domain_id`) " + "REFERENCES `domain` (`id`) ON DELETE CASCADE");
pstmt.executeUpdate();
pstmt.close();
} catch (SQLException e) {