database design – Maintaining multiple data providers and migration approaches in SQL

Consider the synchronization of Basketball matches from an external provider. For this, I have two tables, the match table:

+----+----------------------+-----------+-----------+
| id |         date         | home_team | away_team |
+----+----------------------+-----------+-----------+
| 67 | 2021-07-28 19:45:002 | France    | USA       |
+----+----------------------+-----------+-----------+

and also an external_match table:

+-----------------+----+
|   external_id   | id |
+-----------------+----+
| 8e73rekk0lreppj | 67 |
+-----------------+----+

Now I want to bring in a second provider, which also has this exact match, but with different attributes, like the country, etc.. Then, the idea is to have an implementation ‘switch’ to be able to change at any time between providers. My solution is to update the match table in the following way:

+----+--------------+---------------------+-----------+-----------+---------+----------+
| id | universal_id |        date         | home_team | away_team | country | provider |
+----+--------------+---------------------+-----------+-----------+---------+----------+
| 67 | 62fef7b1770a | 2021-07-28 19:45:00 | France    | USA       |         |        1 |
| 68 | 62fef7b1770a | 2021-07-28 19:45:00 | France    | USA       | Japan   |        2 |
+----+--------------+---------------------+-----------+-----------+---------+----------+

and then the external_match table might become:

+-----------------+----+
|   external_id   | id |
+-----------------+----+
| 8e73rekk0lreppj | 67 |
| 18072481        | 68 |
+-----------------+----+

There is now an universal_id, which is an unique id for the exact same matches across different providers and also a provider column which is used to filter by provider. Notice the different values in external_id column, because those entries come from different providers. Then, to query all matches by provider:

select * from match
...
where provider = ?

and I think it works. However, it’s still unclear how to generate the universal_id, and there are many more entities besides the match table, like team, player etc.. there must be some kind of data matching logic, right? but how is it typically done? and in terms of SQL?

Furthermore, consider some user related data that is indexed by the id column of match table. Now, this content needs to be migrated to use the universal_id right? otherwise it will only show if the ‘switch’ is set for one of the providers.

Do you have any suggestions?
Thanks