diff --git a/mysql-workbench-plugin-doc-generating.py b/mysql-workbench-plugin-doc-generating.py index 09869ba..d50c3a5 100644 --- a/mysql-workbench-plugin-doc-generating.py +++ b/mysql-workbench-plugin-doc-generating.py @@ -15,6 +15,7 @@ def documentation(diagram): text = "#Schema documentation\n\n" text += "Generated by MySQL Workbench Model Documentation v1.0.0 - Copyright (c) 2015 Hieu Le\n\n"; + text += "[TOC]\n\n"; for figure in diagram.figures: @@ -61,11 +62,9 @@ def writeColumnDoc(column, table): text = "| `" + column.name + "`" # column type name - if column.simpleType: - text += " | " + column.simpleType.name - # column max lenght if any - if column.length != -1: - text += "(" + str(column.length) + ")" + if column.formattedRawType: + #use raw formatted + text += " | " + column.formattedRawType else: text += " | "