A long while back, I designed a few Django models with fields like:
documentUUID = models.AutoField("a unique ID for each document",
primary_key=True)
I thought this was good -- I was being explicit about things -- but I've since realized that I'd love to purge my code of these references, and move towards a more standard implementation.
My goals are thus:
primary_key
field.After I asked this I was forced by the code to do some experimentation.
Looks like what you can do is simply:
db.rename_column('Document', 'documentUUID', 'id')
)