Using the API SQL Builder com.healthmarketscience.sqlbuilder
.
DbForeignKeyConstraint constraint = dbTable.foreignKey("fk_" + tableName + "_" + foreignTableName,
columnList.toArray(new String[0]),
foreignTableName,
foreignColumnList.toArray(new String[0]));
how to set the constraint
so that it does ON UPDATE CASCADE
and ON DELETE CASCADE
?