private static List<String> cat( List<? extends ChangeTable<?>> cts, final String r, final boolean forceCat) { final List<String> res = new ArrayList<String>(); for (final ConcatStep step : ConcatStep.values()) { for (final ChangeTable<?> ct : cts) { final String asString = ct.asString(r, step); if (asString != null && asString.length() > 0) { res.add(asString); } } } // don't return [""] because the caller might test the size of the result and assume that // the DB was changed // MySQL needs to have its "alter table add/drop fk" in separate execute() // (multiple add would work in 5.0) if (!forceCat && (cts.size() == 0 || cts.get(0).getSyntax().getSystem() == SQLSystem.MYSQL)) return res; else return Collections.singletonList(CollectionUtils.join(res, "\n")); }