Git Product home page Git Product logo

Comments (22)

Blackdread avatar Blackdread commented on September 28, 2024 1

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.

00xkhaled avatar 00xkhaled commented on September 28, 2024 1

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.

paradox1979 avatar paradox1979 commented on September 28, 2024

same issue, please up them.
regards.

from sql-to-jdl.

paradox1979 avatar paradox1979 commented on September 28, 2024

to dpalaciosarriaga

i got it, before mvn installing, you must set the part of database url in pom.xml.
enjoy!

from sql-to-jdl.

Blackdread avatar Blackdread commented on September 28, 2024

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.

aronmosha avatar aronmosha commented on September 28, 2024

Hello, I got the same issue.
image

from sql-to-jdl.

Blackdread avatar Blackdread commented on September 28, 2024
  1. See jOOQ doc for code generation

  2. Make sure to have the mysql db running otherwise jooq cannot generate these two classes

  3. these classes are generated code so you need to do "mvn compile" at least once before running the main

from sql-to-jdl.

aronmosha avatar aronmosha commented on September 28, 2024

Thanks, MySql is running and files are genereted except for InformationSchema and KeyColumnUsage
image

image

from sql-to-jdl.

Blackdread avatar Blackdread commented on September 28, 2024

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.

aronmosha avatar aronmosha commented on September 28, 2024

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.

00xkhaled avatar 00xkhaled commented on September 28, 2024
  1. See jOOQ doc for code generation
  2. Make sure to have the mysql db running otherwise jooq cannot generate these two classes
  3. 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.

Blackdread avatar Blackdread commented on September 28, 2024

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.
image

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.

ninjaspy avatar ninjaspy commented on September 28, 2024

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.

Blackdread avatar Blackdread commented on September 28, 2024

what is your config?

from sql-to-jdl.

ninjaspy avatar ninjaspy commented on September 28, 2024

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&amp;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.

Blackdread avatar Blackdread commented on September 28, 2024

do not change jdbc:mysql://localhost:3306/my-database

from sql-to-jdl.

ninjaspy avatar ninjaspy commented on September 28, 2024

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.

Blackdread avatar Blackdread commented on September 28, 2024

@sreerajr137 create another issue

from sql-to-jdl.

hana-ch avatar hana-ch commented on September 28, 2024

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.

Blackdread avatar Blackdread commented on September 28, 2024

use "mvn compile" or "mvnw compile", with db ON.
Then read full issue for any other build issue

from sql-to-jdl.

angelsplato avatar angelsplato commented on September 28, 2024

is it possible to connect with a sqlserver database

from sql-to-jdl.

Blackdread avatar Blackdread commented on September 28, 2024

See Readme or #52
Need to impl few changes to support it

from sql-to-jdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.