Hello, I am working with MS SQL server. I inspect the db and got the models. Now I want to remane the model entity name:
cim_vemailaddress = models.CharField(db_column=‘cim_vEmailAddress’, max_length=100, blank=True, null=True)
I want to rename the entity like
CustomerEmailAddress = models.CharField(db_column=‘cim_vEmailAddress’, max_length=100, blank=True, null=True)
An alternative name to the entity.
Does anyone know how to do it?
Yes, you change the name of the field in the model - there’s nothing special about it. (You’ll also need to ensure that all other references to that field are changed as well, but if you’re just starting out with this model, that’s probably not a significant issue.) If this is also a Django-managed model, you may also want to do a makemigrations / migrate.
However, I would strongly recommend that you use standard Python / Django naming conventions. I suggest you use
customer_email_address instead of
Thank you. I just put the DB column and rename the entity how I want it.