Ddl2plantuml
Convert DDL Sql to PlantUML format ER diagram
Install / Use
/learn @wangyuheng/Ddl2plantumlREADME
ddl2plantuml
parse ddl sql to plantuml ER diagram
Demo -> https://ddl2plantuml.yuheng.wang
| before | after |
|------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| |
|
Run
Run With Command
Create docker container with file binding.
docker run --name ddl2plantuml -v $(pwd)/example/ddl.sql:'/ddl.sql' wangyuheng/ddl2plantuml:latest /ddl.sql
(Optional) Modify ddl.sql
vim example/ddl.sql
(Optional) Copy Another file to container
docker cp anothe-ddl.sql ddl2plantuml:/ddl.sql
Start container with attach when container has created
docker start -a ddl2plantuml
Run With API
docker run -e D2P_MODE=web -p 8080:8080 wangyuheng/ddl2plantuml:latest
Access web with http://localhost:8080 Or request api with HTTP
curl --location 'localhost:8080/d2p' \
--header 'Content-Type: application/json' \
--data '{
"ddl": "CREATE TABLE `table_1` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '\''column_1'\'', `prod_name` varchar(20) NOT NULL COMMENT '\''column_2'\'', `prod_type` tinyint(1) unsigned NOT NULL DEFAULT '\''0'\'' COMMENT '\''column_3 0:活期 1:定期'\'', `start_time` time NOT NULL COMMENT '\''停止交易开始时间'\'', `end_time` time NOT NULL COMMENT '\''停止交易结束时间'\'', `online_type` tinyint(1) unsigned NOT NULL DEFAULT '\''0'\'' COMMENT '\''0:上线 1:未上线'\'', `prod_info` varchar(2000) NOT NULL DEFAULT '\'''\'' COMMENT '\''产品介绍'\'', `over_limit` tinyint(1) unsigned NOT NULL DEFAULT '\''0'\'' COMMENT '\''超额限制 0:限制 1:不限制'\'', `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\''This is table 1;'\'';"
}'
Design
Deployment
Build a fat JAR
./gradlew :buildFatJar
Build a Docker image
./gradlew :buildImage
./gradlew :runDocker
Related Skills
feishu-drive
326.5k|
things-mac
326.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
326.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
codebase-memory-mcp
766High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 64 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
