Comments (22)
Do not change (only eventually port and localhost):
-
POM:
<database.url>jdbc:mysql://localhost:3306/</database.url>
-
properties:
url: jdbc:mysql://localhost:3306/?useUnicode=true&characterEncoding=utf8&useSSL=false
Most users will only change:
application:
table-to-export: my_schema
ignored-table-names:
- databasechangelog
- databasechangeloglock
export:
path: ./my-project-jdl.jh
type: jdl
from sql-to-jdl.
Hello @Blackdread I'm currently working on Mac so I don't have PHPMyAdmin running but I have a sql server running and I'm using MAMP as a server, any suggestions ?
from sql-to-jdl.
same issue, please up them.
regards.
from sql-to-jdl.
to dpalaciosarriaga
i got it, before mvn installing, you must set the part of database url in pom.xml.
enjoy!
from sql-to-jdl.
Yes indeed :)
I will add later in readme that pom.xml might need to be changed.
But the default url should work if you have wampserver running for example.
There is also the application.yml of course to set as well
from sql-to-jdl.
from sql-to-jdl.
-
Make sure to have the mysql db running otherwise jooq cannot generate these two classes
-
these classes are generated code so you need to do "mvn compile" at least once before running the main
from sql-to-jdl.
Thanks, MySql is running and files are genereted except for InformationSchema and KeyColumnUsage
from sql-to-jdl.
give your pom.xml, you must have changed it, this issue is very basic.
Default pom.xml I provide is supposed to generate the information schema with everything needed to generate the jdl file:
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.mysql.MySQLDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<!--<inputSchema></inputSchema>--> <!-- This will generate all schema of db, better to only generate the one interested in -->
<inputSchema>information_schema</inputSchema>
</database>
<target>
<packageName>org.blackdread.sqltojava.jooq</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
</generator>
from sql-to-jdl.
Thank you so much.
I found my mistake.
<database.url>jdbc:mysql://localhost:3306/DatabaseName</database.url>
I shoud not added the database name to connection String.
from sql-to-jdl.
- See jOOQ doc for code generation
- Make sure to have the mysql db running otherwise jooq cannot generate these two classes
- these classes are generated code so you need to do "mvn compile" at least once before running the main
i tried to go mvn compile and i got this
A required class was missing while executing org.jooq:jooq-codegen-maven:3.10.5:generate: javax/xml/bind/JAXB
from sql-to-jdl.
Can you provide your configuration?
Also provide a screenshot of phpMyAdmin of dbs you have.
For example, for me property "table-to-export" would be "auto" which is db I want to export to JDL.
I just pulled this project and was able to compile the project.
I also restarted a build with travis, no errors.
Just make sure you have your db ON (wampserver for example), same port, the property "table-to-export" with name of schema to export -> name of db
Important
javax/xml/bind/JAXB has been removed, please use Java 8 for compile and runtime.
from sql-to-jdl.
Do not change (only eventually port and localhost):
- POM:
<database.url>jdbc:mysql://localhost:3306/</database.url>
- properties:
url: jdbc:mysql://localhost:3306/?useUnicode=true&characterEncoding=utf8&useSSL=false
Most users will only change:
application: table-to-export: my_schema ignored-table-names: - databasechangelog - databasechangeloglock export: path: ./my-project-jdl.jh type: jdl
Hello
I ran 'mvn compile' but no jdl was generated from sql. Please do I need to run ant additional command?
from sql-to-jdl.
what is your config?
from sql-to-jdl.
what is your config?
application.yml
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://localhost:3306/?useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password: MyPassword
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jooq:
sql-dialect: mysql
application:
table-to-export: my-database
ignored-table-names:
- databasechangelog
- databasechangeloglock
export:
path: ./my-project-jdl.jh
type: jdl
pom.xml
<database.url>jdbc:mysql://localhost:3306/my-database?useLegacyDatetimeCode=false&serverTimezone=UTC</database.url>
<jdbc>
<driver>com.mysql.cj.jdbc.Driver</driver>
<url>${database.url}</url>
<user>root</user>
<password>MyPassword</password>
</jdbc
I noticed that application.yml is overwritten any time I run "mvn compile".
Thanks
from sql-to-jdl.
do not change jdbc:mysql://localhost:3306/my-database
from sql-to-jdl.
do not change jdbc:mysql://localhost:3306/my-database
application.yml
Where do locate the jdl output that is generated? I can see it anywhere.
Is this okay. This is 100% generated.
application.yml
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://localhost:3306/?useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password:
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 250
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
jooq:
sql-dialect: mysql
application:
table-to-export: my_schema
ignored-table-names:
- databasechangelog
- databasechangeloglock
export:
path: ./my-project-jdl.jh
type: jdl`
from sql-to-jdl.
@sreerajr137 create another issue
from sql-to-jdl.
Hello , i really want steps to run this project .. what are jooq and mysql version you're using .. and what are the config to change exactly .. thank you
from sql-to-jdl.
use "mvn compile" or "mvnw compile", with db ON.
Then read full issue for any other build issue
from sql-to-jdl.
is it possible to connect with a sqlserver database
from sql-to-jdl.
See Readme or #52
Need to impl few changes to support it
from sql-to-jdl.
Related Issues (20)
- Add support for best guess for relationship display fields HOT 2
- Add support for MsSQL Server
- Add support for Oracle HOT 1
- Add husky git hook to format code before commit HOT 1
- Use Mustache.java to render JDL HOT 2
- Add Lombok to reduce boilerplate code and add a builder pattern HOT 3
- Add ability to disable adding options to the generated JDL HOT 1
- Add support for enforcing creation of entity for many-to-many table HOT 5
- Fix unsupported char in filename for windows HOT 1
- In relation, project generate relation unique key instead primary. HOT 3
- Fix a bug 'relationship name is not synchronized' HOT 5
- Add query to fetch values of enums
- Can't use with Postgresql 15.1 HOT 9
- JdlViewMapperImpl is missing in repo HOT 1
- Getting this error when I run sql-to-jdl HOT 1
- Failed to bind properties under 'application' HOT 1
- Reordering and grouping of JDL decalarations in output JDL file
- DB2 luw HOT 1
- oracle JDL file is generated as a empty file issue HOT 1
- Failed to execute CommandLineRunner, with Postgres HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql-to-jdl.