Opened 15 years ago

Closed 15 years ago

#39 closed defect (fixed)

free the postcode importer can't just delete postcodes

Reported by: Dominic Hargreaves Owned by: David Sheldon
Priority: major Milestone: Main release and major publicity
Component: Support scripts Version:
Keywords: Cc:


Because they might have been reported as bad and that information is a) useful and lost when they get deleted and readded and b) forbidden by the DB constraints.

Change History (4)

comment:1 Changed 15 years ago by Dominic Hargreaves

Component: WebsiteSupport scripts

comment:2 Changed 15 years ago by Dominic Hargreaves

My python fu is non-existent, but I think this should be done as follows:

  • for each entry in the new export, add to our DB if it's not already there
  • for each entry in our DB, set deleted='t' if not in the export.

comment:3 Changed 15 years ago by Nick Burch

If we take over freethepostcode, we'll have a single db for both, so we won't need an importer

We can then flag things as we want without them getting deleted

So, do we really want to do fancy things with the import for now, given that we probably won't need it more than a few weeks hence?

comment:4 Changed 15 years ago by Nick Burch

Resolution: fixed
Status: newclosed

OK, the importer now "does the right thing", updating existing entries, adding new entries, and flagging as deleted any that are now missing from the new ftp dump.

Note: See TracTickets for help on using tickets.