Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update existing table JHipster sample app?

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?

like image 283
Raj Avatar asked May 02 '15 16:05

Raj


People also ask

What is Liquibase in Jhipster?

JHipster uses Liquibase to manage the database updates, and stores its configuration in the /src/main/resources/config/liquibase/ directory.


1 Answers

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.

like image 168
Fidan Hakaj Avatar answered Sep 17 '22 20:09

Fidan Hakaj