jhipster.github.io icon indicating copy to clipboard operation
jhipster.github.io copied to clipboard

Adds extra step in instruction for Database updates with the Maven liquibase:diff goal

Open ernesto-butto opened this issue 3 years ago • 5 comments

I want to propose an addition to the Documentation, specifically to

https://www.jhipster.tech/development/ , section: Modify your JPA entity (add a field, a relationship, etc.)

If you modify your entity, for example, you add a new field, then, the new field is added to the

config/liquibase/changelog/DATE_added_entity_ENTITY_NAME.xml

So when the liquibase:diff goal is called, and a new changelog is added such as

<changeSet author="poolebu (generated)" id="1618764540135-3" >
    <addColumn tableName="ENTITY_NAME">
        <column name="NEW_COLUMN" type="bit" defaultValueBoolean="true"/>
    </addColumn>
</changeSet>

Then the changesets conflict.

This commit has my proposal of adding an extra step to the instructions for using the workflow.

ernesto-butto avatar Apr 27 '21 17:04 ernesto-butto

I wonder if this procedure still makes sense with JHipster 7 new feature: incremental changelogs?

gmarziou avatar Apr 27 '21 19:04 gmarziou

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar May 14 '21 17:05 CLAassistant

I wonder if this procedure still makes sense with JHipster 7 new feature: incremental changelogs?

for records, I guess yes, for people that are < JHipster 7 or still want to have a "manual" solution. Maybe we can link the incremental doc here to suggest using it instead.

avdev4j avatar Aug 30 '21 13:08 avdev4j

I covered that in a blog post: https://dev.to/entando/how-to-use-liquibase-to-update-the-schema-of-your-jhipster-application-1cm3

I think it still makes sense to add a note in the documentation.

@poolebu could you please accept the CLA, so I can merge the PR?

avdev4j avatar Nov 16 '21 10:11 avdev4j

@poolebu Can you please sign the CLA so we can merge your PR?

DanielFran avatar May 13 '22 21:05 DanielFran