I would like to carry out my database migration with flyway. This works in most cases, but the renaming of columns does not yet work as expected.
To create the migration scripts, I use the built-in Create flyway versioned migration function of Intellij. When I rename a column, the following script is generated:
ALTER TABLE demo
ADD last_name VARCHAR(255);
ALTER TABLE demo
DROP COLUMN surname;
But I expect something along the lines of:
ALTER TABLE demo ALTER COLUMN surname RENAME TO last_name;
Is there a way to generate this automatically, or do I have to intervene manually in case of renaming?
I tried to use the @Column(name = “last_name”) annotation, but with this I can only change the name of the variable and not the name of the column
MaAsche is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.