Tables like bundle, widget, etc. have both a id primary key, and a name field that is effectively a secondary key, since it's used as such throughout the code. We need a human-readable identifier, because of course we don't want to do things like
because it's unreadable and not human friendly at all. We also could just make name primary key, which I actually don't hate. But short of that, one middle ground would be to set the primary key to be the sha256 of the name. That way they are coupled together.
I actually kind of just want to make name primary key and drop id, come to think of it.
Tables like bundle, widget, etc. have both a
id
primary key, and a name field that is effectively a secondary key, since it's used as such throughout the code. We need a human-readable identifier, because of course we don't want to do things likebecause it's unreadable and not human friendly at all. We also could just make name primary key, which I actually don't hate. But short of that, one middle ground would be to set the primary key to be the sha256 of the name. That way they are coupled together.
I actually kind of just want to make name primary key and drop id, come to think of it.