I'm going to rename a MySQL 8.0 table via Flyway SQL script:
RENAME TABLE aaa TO bbb;
and it's supposed to be run on env many times - but such the script is not idempotent, trying to run it second time I catch an error:
SQL State : 42S01
Error Code : 1050
Message : Table 'bbb' already exists
Location : db/migration/V7__blabla.sql (/usr/local/...)
Line : 1
Statement : RENAME TABLE aaa TO bbb
Could someone suggest please how to handle it?
Many thanks in advance!