Currently, our DB schema stores the name of the default milestone in products.defaultmilestone. It should instead store its ID in a new column products.default_milestone and drop this old one. The bonus point is that when renaming the default milestone, there is no need to rename it here too. Also, it's better to store an integer than a string in the DB. This must be done for consistency with bug 317051.
I intended to file this bug. I may work on it. One more point, the field should be a foreign key.
You need to log in before you can comment on or make changes to this bug.