How to smoothly upgrade temporal server from v1.12.1 to higher version?

We are now using temporal server v1.12.1, and unfortunately we are using advanced visibility with MySQL as storage :frowning: So we have the issue where the new BuildIds search attribute are not understood and cause errors in visibility processing.

The release notes show that v1.21.2 has fixed the issue:
2023-07-12 - 71ae36c - Fix MySQL 8 upgrade script to schema v1.3 (#4598)

We plan to upgrade to higher version to fix the issue, now the problem is: We already have some workflow running in production env, we can just directly upgrade to a higher version(such as v1.21.2), or we need to fix the MySQL schema manually before we upgrade to a higher version? What should we do?