Indexes are specifically NOT applied during a liquibase upgrade, unless the target table is empty. This is to protect the database and application from locking behavior during index creation that could cause an outage. To review index creation SQL separately for each service targeted for upgrade, you can perform several steps:
-
Emit a sql file by referencing your target version liquibase changelog file and reference database using Liquibase utilities.
-
Repeat step 1 for each microservice you plan to upgrade.
The end result be a migrate.sql file that represents the delta between the reference and the target version. Moreover, it should only contain the relevant index creation statements. This SQL will then be useful to apply manually against your environment(s) during a window that best fits your needs.