I downloaded empty proj from spring initializr with web,jpa and postgres dependencies.
Added this config in application.properties
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform = org.hibernate.dialect.PostgreSQL94Dialect
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
and created class Test, that's all I have.
@Entity
@Table(name = "tests")
public class Test {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(length = 200)
private String author;
}
}
And then when the column's length parameter changes nothing happens in the database.
I tried to delete some columns and change some other parameters, result zero "alter table" SQL statements.
Update works only if new column added( update works only on this concrete new column only once).