简体   繁体   English

手动修改jhipster实体

[英]modifying jhipster entity manually

I just follow the steps given below 我只是按照下面给出的步骤

  • Run yo jhipster:entity entityName. 运行yo jhipster:entity entityName。
  • Modify entities (add, remove, ...), at the end, jhipster will give question to override file, IMPORTANT NOTE: choose NO for changelog .xml file and navbar.html file. 修改实体(添加,删除,...),最后,jhipster将提出问题以覆盖文件,重要说明:对于changelog .xml文件和navbar.html文件,请选择NO。
  • Back to project and run mvn compile liquibase:diff. 返回项目并运行mvn compile liquibase:diff。
  • 5. Run your application. 5.运行您的应用程序。
  • No errors or warnings on this command (mvn compile liquibase:diff). 此命令没有错误或警告(mvn编译liquibase:diff)。

The jhipster webapp changed. jhipster网络应用程序已更改。 New Column updated.But No changes reflected in MYSQL-database 新列已更新。但MYSQL数据库中未反映任何更改

On Running Maven project it shows the error(mvnw) jhipster_mysql_database_error 在正在运行的Maven项目上,它显示错误(mvnw) jhipster_mysql_database_error

liquibase:diff is only working, when you are changing your database manually, and want to have a difference between the migrated and your modified state. liquibase:diff仅在手动更改数据库并希望在已迁移状态和修改状态之间有所不同时才起作用。 Changing just the entity classes and running liquibase:diff afterwards won't change anything. 之后仅更改实体类并运行liquibase:diff不会更改任何内容。

In your scenario you should change your mysql database manually, and run liquibase:diff to make your changes taking effect 在您的方案中,您应该手动更改mysql数据库,然后运行liquibase:diff使更改生效

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

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