def METHOD_NAME(from_table, to_table):
    def fcn(apps, schema_editor):
        with schema_editor.connection.cursor() as cursor:
            cursor.execute('SELECT indexname FROM pg_indexes WHERE tablename = %s', [from_table])
            indexes = [row[0] for row in cursor.fetchall()]
            for index_name in indexes:
                _validate_old_index_name(index_name, from_table)
                new_index_name = index_name.replace(from_table, to_table, 1)
                _validate_identifier(index_name)
                _validate_identifier(new_index_name)
                cursor.execute('ALTER INDEX %s RENAME TO %s' % (index_name, new_index_name))
    return fcn