I have @NotNull annotation on some fields. However when I try to generate a diffChangelog, it drops all the not null constraints
Sample Class :
public class User {
@NotNull
private String email;
}
The diffChangeSet :
<changeSet author="author (generated)" id="1437485184491-4">
<dropNotNullConstraint columnDataType="varchar(255)" columnName="email" tableName="user"/>
</changeSet>
The only solution seems to be adding an extra annotation @Column(nullable = false) on every field. Can i do anything so that I do not have to add an extra annotation on every field.
if anyone still has problem with this I recently found out that it has been fixed in liquibase-hibernate5-3.7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With