Skip to content

Data type is not updating on Database

In my entity class, I want to change the data type of a field but it’s not updating in the database. I am using PostgreSQL. I have also tried adding this:


in application properties and still, it doesn’t work I don’t know why, please help, and thanks.

What I have :

@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id // change Integer into Long data type in the database



If you just created your database and doesn’t have any data in it you can try


update will only update the database rows it won’t alter the table in PostgreSql.

User contributions licensed under: CC BY-SA
8 People found this is helpful