「」というエンティティを作成しましたイベント"コマンドを使用 yo jhipster:entity event 作成中に1つの列を追加するのを忘れましたevent_title「だから、liquibase changelog xmlにthis(event_tile)列を手動で追加しました。 イベント 新しく追加された列を持つテーブル?
回答:
回答№1の場合は3新しいchangelogファイルをに含める必要があります src/main/resources/config/liquibase/master.xml
ファイル。
<include file="classpath:config/liquibase/changelog/my_new_changelog.xml"
relativeToChangelogFile="false"/>
次回アプリを実行すると、変更が適用されます。
次のmavenタスクを使用してデータベースを更新することもできます。
mvn liquibase:update
.
ここには 開発でのjhipsterの使用に関するドキュメント.
回答№2については2
にファイルを作成しました
src/main/resources/config/liquibase
例:
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="lazaro" id="altertable-02">
<addColumn catalogName="mySchema"
schemaName="public"
tableName="myTableName">
<column name="atributeName" type="bigint"/>
</addColumn>
</changeSet>
そして追加
src/main/resources/config/liquibase/master.xml
includeタグ:
<include file="classpath:config/liquibase/changelog/add_column_quantity_entity_Item.xml" relativeToChangelogFile="false"/>