0
I’m coding a API Restful with Spring Boot v.2.0 etc. The case is that when I try to make a deploy to the Heroku using Migration (Flyway) of insertion the ids get high.
My model or entity of User this with the id thus:
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
And even if I do the insert in the "big hand" by Mysql Workbench he gets the id like this:
Hellp!
Your problem is the "39" in the field id? If so, is there any special reason why this should bother you? "Holes" in the sequence should not break the application... In Innodb you cannot reset AUTO_INCREMENT to a value less than the column max(), but you can use
ALTER TABLE nome_da_tabela AUTO_INCREMENT = 1
truncate your table before...– nunks
So, I do the truncate and do not do anything later, I will try to see if it works to alter the tbl. Thanks.
– Rafael Souza Calearo