pub async fn rename_mysql_index_if_exists<C>(
db: &C,
table_name: &str,
old_index_name: &str,
new_index_name: &str,
) -> Result<(), DbErr>where
C: ConnectionTrait,Expand description
Renames a MySQL index when the source exists and the target does not.
Calling it repeatedly is safe.
ยงErrors
Returns an error for invalid identifiers, a non-MySQL connection, a failed existence query,
or a failed ALTER TABLE statement.