All Projects → xwsg → plantuml2ddl

xwsg / plantuml2ddl

Licence: Apache-2.0 License
Intellij IDEA plugin- MySQL DDL and PlantUML convert to each other.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to plantuml2ddl

gitextender
Git Extender is a plugin for jet brains products, like IntelliJ IDEA, which offers the option of updating all local branches that track a remote one for all git roots in the project
Stars: ✭ 15 (-34.78%)
Mutual labels:  intellij
py2puml
Generate PlantUML class diagrams to document your Python application.
Stars: ✭ 51 (+121.74%)
Mutual labels:  plantuml
ansible-role-intellij
Ansible role for installing the IntelliJ IDEA IDE
Stars: ✭ 39 (+69.57%)
Mutual labels:  intellij
zeekEye
A Fast and Powerful Scraping and Web Crawling Framework.
Stars: ✭ 36 (+56.52%)
Mutual labels:  intellij
intellij-mob
IntelliJ plugin for swift git handover and timer
Stars: ✭ 26 (+13.04%)
Mutual labels:  intellij
smeagol
Store your technical documentation with in your git repository
Stars: ✭ 19 (-17.39%)
Mutual labels:  plantuml
plantuml-libs
A set of PlantUML libraries and a NPM cli tool to design diagrams which focus on several technologies/approaches: Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), C4 Model or even EventStorming and more.
Stars: ✭ 75 (+226.09%)
Mutual labels:  plantuml
idea-php-advanced-autocomplete
Plugin for PhpStorm IDE. Adds auto-completion support for various built-in PHP functions, where parameter is a string literal.
Stars: ✭ 57 (+147.83%)
Mutual labels:  intellij
eventbus-plugin
IntelliJ iDEA plugin to work with projects using greenrobot's EventBus library
Stars: ✭ 25 (+8.7%)
Mutual labels:  intellij
MarioProgressBar
The Mario progress bar for IntelliJ IDEA and other JetBrains IDEs.
Stars: ✭ 29 (+26.09%)
Mutual labels:  intellij
kotest-intellij-plugin
The official Kotest plugin for Intellij and Android Studio
Stars: ✭ 96 (+317.39%)
Mutual labels:  intellij
intellij-idea-ultimate
Unofficial .deb packages of IntelliJ IDEA Ultimate Edition. This is a mirror of https://gitlab.com/mmk2410/intellij-idea-ultimate
Stars: ✭ 16 (-30.43%)
Mutual labels:  intellij
openjfx-docs
Getting started guide for JavaFX 11
Stars: ✭ 70 (+204.35%)
Mutual labels:  intellij
sourcegraph-jetbrains
Sourcegraph for JetBrains IDEs (IntelliJ)
Stars: ✭ 34 (+47.83%)
Mutual labels:  intellij
GapStyle
The world-first* productivity-oriented color scheme for intelliJ and VSCode to fill the gap between programming languages and human.
Stars: ✭ 111 (+382.61%)
Mutual labels:  intellij
mdbook-plantuml
mdBook preprocessor to render PlantUML diagrams to png images in the book output directory
Stars: ✭ 43 (+86.96%)
Mutual labels:  plantuml
slides-presenter
Plugin to show slides and code examples directly from IntelliJ IDEs
Stars: ✭ 19 (-17.39%)
Mutual labels:  intellij
idea-php-shopware-plugin
Shopware Plugin for PhpStorm which extends Symfony Plugin
Stars: ✭ 50 (+117.39%)
Mutual labels:  intellij
xmake-idea
🍨 A XMake integration in IntelliJ IDEA
Stars: ✭ 44 (+91.3%)
Mutual labels:  intellij
mapstruct-idea
An IntelliJ IDEA plugin for working with MapStruct
Stars: ✭ 80 (+247.83%)
Mutual labels:  intellij

PlantUML2DDL

Intellij IDEA plugin PlantUML2DDL for Mysql DDL and PlantUML Entity Relationship Diagram convert to each other.

Installation

Install this plugin both from plugin marketplace and from disk releases

Defining Symbol

Symbol Explain Example
# PRIMARY KEY #id : bigint(20)
<<pk>> PRIMARY KEY id : bigint(20) <<pk>>
* NOT NULL *type : tinyint(4)
<<notnull>> NOT NULL type : tinyint(4) <<notnull>>
<<generated>> AUTO_INCREMENT #id : bigint(20) <<generated>>
<<default:{DEFAULT_VALUE}>> DEFAULT {DEFAULT_VALUE} *name : varchar(50) <<default:'anonymous'>>
type : tinyint(4) <<default:0>>
--{COLUMN_COMMENT} column COMMENT '{COLUMN_COMMENT}' *name : varchar(50) <<default:'anonymous'>> --用户名
{TABLE_COMMENT}
--/../==/__
table COMMENT '{TABLE_COMMENT}' entity "tbl_user" {
  用户表
  --
}
entity "tbl_user" {
  用户表
  ..
}
entity "tbl_user" {
  用户表
  ==
}
entity "tbl_user" {
  用户表
  __
}

Usage

Convert PlantUML to DDL

  1. Open a PlantUML file
  2. In this file, Right-click or Alt-Insert
  3. Select Generate -> PlantUML -> DDL.

For example: mall.puml

@startuml

' hide the spot
hide circle

' avoid problems with angled crows feet
skinparam linetype ortho

entity "tbl_user" as user {
  用户表
  --
  #id : bigint(20) <<generated>>
  --
  *type : tinyint(4) <<default:0>> --用户类型:0-PC用户,1-移动端用户
  *name : varchar(50) <<default:'anonymous'>> --用户名
  description : varchar(200) <<default:'some string'>> --用户描述
}

entity "tbl_order" as order {
  订单表
  ==
  #id : bigint(20) <<generated>>
  --
  * **order_number** : varchar(20)  <<default:'0'>> -- 订单号
  *user_id : bigint(20) <<FK>> <<default:0>> -- 用户id
  *item_id: bigint(20) <<FK>> <<default:0>> -- 商品id
}

entity "tbl_item" as item {
  商品表
  ..
  #id : bigint(20)  <<generated>>
  --
  title : varchar(50)  <<default: 'wahaha'>> <<notnull>> -- 商品标题
  *price : int(11) <<default: 0>> -- 商品价格
}

user }|..|{ order
item }|..|{ order

@enduml

plantuml2ddl

In the same directory, will generate a file mall-{yyyyMMddHHmmss}.sql:

CREATE TABLE IF NOT EXISTS `tbl_user` (
    `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
    `type` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '用户类型:0-PC用户,1-移动端用户',
    `name` VARCHAR(50) NOT NULL DEFAULT 'anonymous' COMMENT '用户名',
    `description` VARCHAR(200) DEFAULT 'some string' COMMENT '用户描述',
    PRIMARY KEY (`id`)
) COMMENT '用户表';

CREATE TABLE IF NOT EXISTS `tbl_order` (
    `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
    `order_number` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT '订单号',
    `user_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '用户id',
    `item_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '商品id',
    PRIMARY KEY (`id`)
) COMMENT '订单表';

CREATE TABLE IF NOT EXISTS `tbl_item` (
    `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(50) NOT NULL DEFAULT 'wahaha' COMMENT '商品标题',
    `price` INT(11) NOT NULL DEFAULT 0 COMMENT '商品价格',
    PRIMARY KEY (`id`)
) COMMENT '商品表';

Convert DDL to PlantUML

  1. Open a DDL file
  2. In this file, Right-click or Alt-Insert
  3. Select Generate -> DDL -> PlantUMLL.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].