DB Error after upgrading to v4

Got the same error when upgrading from v3.42.3 to v4.
Incorrect index name ‘migrations_lock_lock_key_unique’

alter table migrations_lock add primary key migrations_lock_pkey(lock_key) - ER_WRONG_NAME_FOR_INDEX: Incorrect index name
‘migrations_lock_lock_key_unique’

Error ID:
dd913990-8b0d-11eb-8f67-898ec2cfea09

Error Code:
ER_WRONG_NAME_FOR_INDEX