Page MenuHomeSoftware Heritage

Migrate away from using sha1s as foreign keys in the database
Open, LowPublic


In the main swh database, our current inter-table links are mostly done using sha1s. This makes it hard to change object identifiers on the fly, or to gradually compute a new version of object identifiers. It also makes our tables and indexes fairly big.

Most tables containing objects already come fitted with an opaque object_id field, that could be used to do inter-object links, at the expense of some "self-containedness" of the database tables.

Of course, all our public APIs must keep presenting intrinsic identifiers for inter-object links.