I tried adding a new attribute to an entity Customer which already has data stored in the database:
private boolean isArchived;
This gives me the following error when i start spring and try to update the tables:
Error executing DDL "alter table customer add column is_archived boolean not null" via JDBC Statement
Is that because he tries to initialize isArchived
with null for the already existing rows and the primitive type cant be null? Is there a way to just initialize them with false instead or do i have to use Boolean
instead of boolean
to allow null values(which i would like not to allow)?