Basically when importing systems from EDSM, they come with addresses (as they should), but those addresses don't match up with the data coming in from EDDN. This leads to duplicate system issues.
My first crack at fixing this was to make the name the PRIMARY KEY, but that means I need to also learn about SQL MERGE because I can't ON CONFLICT multiple unique constraints as OR instead of AND.
Alternatively, we don't change the DB and we just take more care when fetching before inserting.
Basically when importing systems from EDSM, they come with addresses (as they should), but those addresses don't match up with the data coming in from EDDN. This leads to duplicate system issues.
My first crack at fixing this was to make the name the
PRIMARY KEY
, but that means I need to also learn about SQLMERGE
because I can'tON CONFLICT
multiple unique constraints as OR instead of AND.Alternatively, we don't change the DB and we just take more care when fetching before inserting.