nixpulvis / galos

Elite: Dangerous Database and Tools
3 stars 0 forks source link

Resolve mismatched system addresses/names/positions on EDSM sync #14

Open nixpulvis opened 3 months ago

nixpulvis commented 3 months ago

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.

nixpulvis commented 3 months ago

We should probably think about conflicts on position here as well, those are also not handled.