Repository: cloudstack Updated Branches: refs/heads/4.3 2215fbf4c -> 5ccde5de9
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 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5ccde5de Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5ccde5de Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5ccde5de Branch: refs/heads/4.3 Commit: 5ccde5de93db2a9b7768771912d2111cedbb1ed4 Parents: 2215fbf Author: Harikrishna Patnala <harikrishna.patn...@citrix.com> Authored: Mon May 5 20:32:44 2014 +0200 Committer: Daan Hoogland <d...@onecht.net> Committed: Mon May 5 20:39:33 2014 +0200 ---------------------------------------------------------------------- .../src/com/cloud/upgrade/dao/Upgrade302to40.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5ccde5de/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java ---------------------------------------------------------------------- diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java index 45f5f1b..b291d8f 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java @@ -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) {