I just had this problem and wanted to add information. Having fixed the problem, I wrapped it through migrations. Anyone who can add to this, please feel free to fix it.
This application uses Django 1.11, Py3, and it ported the form of an early local developer to SQLite (just a few things to prove the concept). When switching to PG, I had the same error:
ERROR: operator class "varchar_pattern_ops" does not accept uuid data type
I was able to fix this in two ways. At an early stage of the application, I was able to erase and start from scratch. I know this is rarely an option, but my actions provide useful hints to fix this in a migration or upgrade scenario. I have good SQL / PG chops that form a time when using ORM was not common. The question was a real puzzle for me.
Problem
In my 5 year old brain, a problem arose by changing the column types, moving from string-ish to UUID "native". Using migrations in my application, it seems like a column was created that is not a UUID native. With the introduction of the Django UUIDField model, demand was not satisfied and threw the above error. This problem is akin to the fact that you are doing something stupid moving from str to int type in a DB with values ββother than int.
Error Information
I was able to fix this in two ways.
First, Django squash migration was done. I have already encountered a similar error related to the use of UUIDs in my application, so I knew about this error pattern. By resetting the migration, you skip earlier column creation without a UUIDField and only properly declare the column. When I started (fresh) migrate again, everything went fine.
The second method is hardly a variation, but I killed all the migrations and started from the current state. The same effect as the previous one.
So..
With all that said, for me, I was able to rearrange the problem in a way that works in my head. The "fix" was to never create a column other than UUIDField. My problem was with replacing SQLite with PG (AFIK).
If I were doing an update, I think that deciding to kill the index (s) and recreate them is the way to go.
Again, just trying to provide some information about this error, googleweb did not return anything that really caught me. So I chose a pick and a flash.