Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to use generateChangelog instead of diff to generate the sql corresponding to the jakarta annotations #66

Open
jonenst opened this issue Oct 7, 2024 · 0 comments

Comments

@jonenst
Copy link
Contributor

jonenst commented Oct 7, 2024

Describe the current behavior

the readme suggests

Another possibility is to dump the sql statements corresponding to the jpa annotations (replace DATABASE_TYPE by your database vendor, to get a list of supported types, execute the command as is):

mvn compile liquibase:dropAll liquibase:diff -Dliquibase-diff.outputFile=out.DATABASE_TYPE.sql

so we force dropAll and then run a diff against this empty database, which is a weird way to do it...

Describe the expected behavior

instead we should be able to do

mvn clean compile liquibase:generateChangeLog -Dliquibase.outputChangeLogFile=out.postgresql.sql

Describe the motivation

simplify, allow more possibilities because they may turn out to be useful

Extra Information

note: currently this is the best we can do I think but it's ugly you have to copypaste a huge property

$ mvn clean compile liquibase:generateChangeLog -Dliquibase.outputChangeLogFile=out.postgresql.sql  -Dliquibase.databaseUrl='hibernate:spring:org.gridsuite.study.server?dialect=org.hibernate.dialect.PostgreSQLDialect&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy' -Dliquibase.databaseDriver='liquibase.ext.hibernate.database.connection.HibernateDriver'

also the generateChangelog and diff produce sligtly different results (varchar vs text, uuid vs varchar(36), double precision vs float(53) this kind of things).. not sure what the implications are

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant