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 :
@Id @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.