When using Spring boot to create an API, I've created an entity User
with some fields like firstname
, lastname
, ...
The first time I've launched the application, the table is created in the database with all the fields.
Then I update one field adding @Column(nullable = false)
to it.
And then, when I run the application again the field is not updated with the new attribute I've added to it.
In my application.properties
i use this param: spring.jpa.hibernate.ddl-auto=update
but it's not updating anything i don't know why