Skip to content

Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)

License

Notifications You must be signed in to change notification settings

prasadjoshi123/sql-to-jdl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status StackShare

sql-to-jdl

Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)

Why not use tools like UML provided on jHipster?

  • JDL from web is ok for a few entities but not for more than 100 entities and relations
  • UML software and xml exporters could have worked (other tools on jHipster) but:
    • already many databases in production to be exported in JDL (faster to generate the JDL from it)
    • already working UML design with MySQL Workbench

How to use

Run "mvn compile" at least once to let jOOQ generate some required tables (see Issue solved).

Set properties file:

  • Schema name to export
  • Tables names to be ignored
  • Path of export file

After JDL file is generated

Still have some manual steps to do:

  • review relations:
    • ManyToMany
    • Owner side display field
    • Inverse side field name and display field
    • Bidirectional or not
  • add values to enums
  • review validations of entities

Use of

  • jOOQ
  • Spring boot

Default specific rules

Table is treated as enum if only 2 columns and both are: "id" AND ("code" OR "name")

Table is treated as ManyToMany if only 2 columns and both are foreign keys

Links

jHipster JDL

About

Tool to translate SQL databases to JDL format of jHipster (Created due to existing databases to be generated with jHipster and build angular-java web)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%