weizhouapache commented on code in PR #7381:
URL: https://github.com/apache/cloudstack/pull/7381#discussion_r1178300491
##########
engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java:
##########
@@ -26,6 +26,17 @@ public class DatabaseAccessObject {
private static Logger s_logger =
Logger.getLogger(DatabaseAccessObject.class);
+ public void addForeignKey(Connection conn, String tableName, String
tableColumn, String foreignTableName, String foreignColumnName) {
+ String addForeignKeyStmt = String.format("CALL
`cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('%s', '%s', '%s', '%s')", tableName,
tableColumn, foreignTableName, foreignColumnName);
Review Comment:
@DaanHoogland
my suggestion is (do not commit it)
```suggestion
String addForeignKeyStmt = String.format("ALTER TABLE xxx ADD
CONSTRAINT xxxxx xxxxx");
```
with the changes in schema-41720to41800.sql, the procedure
`IDEMPOTENT_ADD_FOREIGN_KEY` is not used at all, so we can remove it to avoid
it being used in the future
cc @harikrishna-patnala
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]