codeintel: RFC 235: Soft delete upload records
Created by: efritz
In preparation for RFC 235 which migrates LSIF data to Postgres: This PR introduces a new state for lsif_uploads, deleted
, which acts as a soft-delete marker for upload records. The janitor is now responsible for hard deleting these records after cleaning up their associated data.
In the future, this will allow the janitor to more safely delete data associated with a missing record (if it's soft deleted we know it's not an accident; if it's missing we don't know if it's a part of a database backup, a misconfiguration, etc). There should be no user-observable behavioral changes in this PR.
This also does a bit of work required by https://github.com/sourcegraph/sourcegraph/issues/12168, as detailed in the related RFC.