How to update existing table JHipster sample app?

Raj picture Raj · May 2, 2015 · Viewed 8.9k times · Source

I have created an entity called "event" using command yo jhipster:entity event while creating I forgot add one column let's say "event_title" so, I have added this(event_tile) column manually in liquibase changelog xml. Now how to update event table with newly added column?

Answer

Fidan Hakaj picture Fidan Hakaj · May 2, 2015

You need to include the new changelog file in your src/main/resources/config/liquibase/master.xml file.

<include file="classpath:config/liquibase/changelog/my_new_changelog.xml" 
    relativeToChangelogFile="false"/>

Next time you run the app, changes will be applied.

You can also update the database with the following maven task : mvn liquibase:update.

Here is the doc about using jhipster in development.