【发布时间】:2019-04-01 12:52:02
【问题描述】:
我有一个JPA entity 叫客户,是这样的
@Entity
public class Customer {
private int custNo;
private String custName;
private String country;
public Customer() {
}
public Customer(int custNumber, String custName, String country) {
this.custNo = custNumber;
this.custName = custName;
this.country = country;
}
public int getCustNo() {
return custNo;
}
public void setCustNo(int custNo) {
this.custNo = custNo;
}
public String getCustName() {
return custName;
}
public void setCustName(String custName) {
this.custName = custName;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
}
我的数据库有 2 个表:- BE132_name 和 BE1jj231_address ,
我正在运行我的个人资料liquibase:diff,并为我提供如下更改集
<changeSet author="jobs (generated)" id="1554122585461-10">
<dropTable tableName="BE132_name"/>
</changeSet>
<changeSet author="jobs (generated)" id="1554122585461-11">
<dropTable tableName="BE1jj231_address"/>
</changeSet>
您可以看到它创建了删除表,因为我没有相应的JPA 实体。但是为什么它不为我的客户创建 create script 呢?
对于一个空的数据库(没有任何表),我得到了
INFO 4/2/19 5:47 PM: liquibase: No changes found, nothing to do
【问题讨论】:
-
是不是因为数据库中的表还不存在?有人可以帮我吗?