Hello everybody,
Could you please help me with the following issue because I have tried many things but none has worked.
I have added a new column in one of the domain classes as shown below:
@Column(name = "my_item")
private String myItem;
But the command mvn liquibase:diff is not returning this change in the changelog.
I have captured the log of the diff operation. It shows that the new column has been detected and there is no error during execution.
[INFO] Found column my_item varchar(255)
Below is the liquibase-maven-plugin configuration in the pom.xml
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.29.0</version>
<configuration>
<changeLogFile>src/main/resources/db/changelog/db.changelog-master.yaml</changeLogFile>
<outputChangeLogFile>db-changelog.xml</outputChangeLogFile>
<diffChangeLogFile>src/main/resources/db/migrations/${timestamp}_changelog.xml</diffChangeLogFile>
<url>jdbc:postgresql://172.54.98.77:5432/nn</url>
<driver>org.postgresql.Driver</driver>
<username>nnuser</username>
<password>123456</password>
<referenceUrl>hibernate:spring:com.nn.domain?dialect=org.hibernate.dialect.PostgreSQLDialect</referenceUrl>
<verbose>true</verbose>
<logging>debug</logging>
</configuration>
<dependencies>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.29.0</version>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate6</artifactId>
<version>4.28.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>6.6.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>6.0.0.Alpha7</version>
</dependency>
</dependencies>
</plugin>