Overview of the feature request
As just done in the entity-generator, it would be great to add an option in order to skip liquibase usage avoiding to insert liquibase java dependency. Saving the option in the yo-rc.json, the entity generation automatically skips the changelog generation.
Motivation for or Use Case
In my business scenario, I have a flyway tool that manages the scripts migration. So I want to exclude liquibase support.
P.S. If you want I can provide a PR for this.
Thanks
You basically want to disable liquibase, right?
You basically want to disable liquibase, right?
yes
Why? If it's for your generator, then you can remove it from your custom code (remove related files and/or entries). Unless I'm missing something of course...
Why? If it's for your generator, then you can remove it from your custom code (remove related files and/or entries). Unless I'm missing something of course...
Yes, I can remove it from my custom blueprint, but the option is already supported in the entity generator, so it is good to add that skip option also in the base blueprint generator, in order to avoid to add unuseful liquibase java dependencies from pom.xml or gradle file.
Besides, after generated the app and stored the option in the yo-rc.json, the entity generator finds the answer and automatically not generate changelogs.
Let's discuss.
I see 2 solutions for that.
1) remove directly from the blueprint, once it's generated
2) add an option in generator-jhipster to support it, for example jhipster --skip-liquibase, no additional question
The work would be:
.yo-rc.jsonThen, if I use: jhipster --skip-liquibase and generate with default option, it won't work out of the box.
It's doable, and I understand the need.
What about, if later, another user wants an option to not generate file in aop/logging.
Should we add --skip-aop ?
Then later, another wants an option to skip audit files.
Should we add --skip-audit ?
Then, another hates Docker, doesn't want src/main/docker.
Should we add --skip-docker-compose ?
For these reasons, I think the 1st solution is better for the main generator-jhipster.
Hi @pascalgrimaud,
my considerations:
Finally, just now with that entity customization there won't be faker data for the entites, and so out of box it does not work.
I don't understand:
Finally, just now with that entity customization there won't be faker data for the entites, and so out of box it does not work.
Which option doesn't work today, in generator-jhipster ? Can you provide me the main steps plz ?
I don't understand:
Finally, just now with that entity customization there won't be faker data for the entites, and so out of box it does not work.
Which option doesn't work today, in generator-jhipster ? Can you provide me the main steps plz ?
According this commit, the entity-generator could not generate changelog for liquibase in new entities. So for that however I haven't data or I can't use liquibase features in that generation.
I agree with 1st solution too.
Liquibase is the solution supported and promoted by JHipster. If you want to use something else, either you modify the code after generation or automate that in a blueprint. As per our Policy 2, I don't think we should add more option regarding liquibase.
Also, don't misinterpret the new --skip-db-changelog option: its main goal is to help in your development workflow when you have already shipped some code in production and thus you will systematically disregard db changelogs generated by JHipster when you regenerate an entity (e.g. adding a new field). Because you don't need a full changelog that create the table, but a delta changelog that will alter the table.
ok, well, I will close the issue, I provide that in my custom blueprint
Most helpful comment
I agree with 1st solution too.
Liquibase is the solution supported and promoted by JHipster. If you want to use something else, either you modify the code after generation or automate that in a blueprint. As per our Policy 2, I don't think we should add more option regarding liquibase.
Also, don't misinterpret the new
--skip-db-changelogoption: its main goal is to help in your development workflow when you have already shipped some code in production and thus you will systematically disregard db changelogs generated by JHipster when you regenerate an entity (e.g. adding a new field). Because you don't need a full changelog that create the table, but a delta changelog that will alter the table.