简体   繁体   English

Jhipster JDL导入不更新表

[英]Jhipster jdl import not updating table

When I make any changes in jdl file and run 当我在jdl文件中进行任何更改并运行时

jhipster import-jdl myjdl.jh 

It doesn't update the existing table in on disk H2 db. 它不会更新磁盘H2 db中的现有表。 What am I missing here? 我在这里想念什么?

Thanks 谢谢

When using the H2 Disk database, all of your data is stored in the target (mvn) or build (gradle) folders. 使用H2磁盘数据库时,所有数据都存储在target (mvn)或build (gradle)文件夹中。 You can remove all data and tables by running ./mvnw clean or ./gradlew clean . 您可以通过运行./mvnw clean./gradlew clean删除所有数据和表。 The new database tables will be created the next time you start your app. 下次您启动应用程序时,将创建新的数据库表。

In production, you should use Liquibase migrations which are detailed in JHipster's "Using a Database" docs . 在生产中,应该使用Liquibase迁移,这在JHipster的“使用数据库”文档中进行了详细介绍。 The docs mention that these Liquibase migrations may work with H2 Disk (dev profile only) if you need to keep your data, but it is not tested. 该文档提到,如果您需要保留数据,则这些Liquibase迁移可以与H2磁盘(仅dev配置文件)一起使用,但尚未经过测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM