Skip to content

Commit

Permalink
Pass -rails param when using -all
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Sep 25, 2008
1 parent 5a81a4f commit b33d6ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/net/sourceforge/schemaspy/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ public List<String> asList() throws IOException {
list.add("-norows");
if (isRankDirBugEnabled())
list.add("-rankdirbug");
if (isRailsEnabled())
list.add("-rails");
if (!isAdsEnabled())
list.add("-noads");

Expand Down
7 changes: 3 additions & 4 deletions src/net/sourceforge/schemaspy/SchemaAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,12 @@ public int analyze(Config config) throws Exception {
// getting implied constraints has a side-effect of associating the parent/child tables, so don't do it
// here unless they want that behavior
List<ImpliedForeignKeyConstraint> impliedConstraints = null;
if (config.isRailsEnabled()) {
DbAnalyzer.getRailsConstraints(db.getTablesByName());
impliedConstraints = new ArrayList<ImpliedForeignKeyConstraint>();
} else if (includeImpliedConstraints)
if (includeImpliedConstraints)
impliedConstraints = DbAnalyzer.getImpliedConstraints(tables);
else
impliedConstraints = new ArrayList<ImpliedForeignKeyConstraint>();
if (config.isRailsEnabled())
DbAnalyzer.getRailsConstraints(db.getTablesByName());

List<Table> orphans = DbAnalyzer.getOrphans(tables);
boolean hasOrphans = !orphans.isEmpty() && Dot.getInstance().isValid();
Expand Down

0 comments on commit b33d6ab

Please sign in to comment.