Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toc mark and update column data type format #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions mysql-workbench-plugin-doc-generating.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 += " | "

Expand Down