I'm using a H2 database to store my Data, and liquibase (with hibernate plugin) to check for differences between database and projet.
suppose I have followign Code:
@Entity
public class myEntity{
@Column(name="val")
private int value;
}
The database is in place and already stores some data.
Now when I rename the above Column i.e. from val to value and run liquibase:diff, the difflog says to drop the column "val" and add a column "value".
Obviously this is not what I wanted, because all the data originally stored in the "val" column would be gone.
Is there a way to tell liquibase that its not a new column, but an old renamed one?
I want to run liquibase:diff and the generated diffLog should automatically contain the rename... tag for my Column, not an add.. and a drop.. one..