mirror of https://github.com/apache/cloudstack.git
Bug 12292: updated netapp_volume primary key for upgrades
Status 12292: resolved fixed Reviewed-By: Nitin
This commit is contained in:
parent
a068475dcb
commit
847b5bc983
|
|
@ -80,5 +80,15 @@ public class Upgrade2213to2214 implements DbUpgrade {
|
|||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to execute usage_event table update", e);
|
||||
}
|
||||
|
||||
//Drop netapp_volume primary key and add it again
|
||||
DbUpgradeUtils.dropPrimaryKeyIfExists(conn, "cloud.netapp_volume");
|
||||
try {
|
||||
PreparedStatement pstmt = conn.prepareStatement("ALTER TABLE `cloud`.`netapp_volume` add PRIMARY KEY (`id`)");
|
||||
pstmt.executeUpdate();
|
||||
pstmt.close();
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to update primary key for netapp_volume", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue