Please run the following SQL in the SQL Server PI repository database to check if the pa_repository records exist or not:
select * from pa_repository
If the pa_repository record does NOT exist, you can run below SQL to insert pa_repository record:
Upgrading from cartridge 6.3
insert into pa_repository values(current_timestamp, '20200814-1500', '5.0.4-0', '1.16', 0)
Upgrading from cartridge 7.1
insert into pa_repository values(current_timestamp, '20200814-1500', '5.0.4-0', '1.17', 0)
Upgrading from cartridge 7.3
insert into pa_repository values(current_timestamp, '20200814-1500', '5.0.4-0', '1.18', 0)
Upgrading from cartridge 8.0
insert into pa_repository values(current_timestamp, '20200814-1500', '5.0.4-0', '1.20', 0)
Then retry the upgrade step.
Note: It is okay to have multiple rows in this table with each having a different schema_version number.