» Django – How to rename a model field using South?
Django – How to rename a model field using South?
|July 13, 2010
Posted by forumadmin
I would like to change a name of specific fields in a model:
name = models.CharField()
rel = models.ForeignKey(Bar)
should change to:
full_name = models.CharField()
odd_relation = models.ForeignKey(Bar)
What’s the easiest way to do this using South?
More Related Questions
- How do I support an old and new database scheme at the same time in Django? Current situation, caused by legacy:
field = models.BooleanField()
- South doesnt recognize new model South doesn't recognize the modifications that I'm trying to make to my models.py.
This is the new model that I want to create:
question = […]
- What is a Django South GhostMigrations exception and how do you debug it? Made some changes to my Django app's model and used South to migrate them on my development machine (migrations 0004 through 0009). But when trying to migrate these changes on the server, […]
- migrating django-model field-name change without losing data I have a django project with a database table that already contains data. I'd like to change the field name without losing any of the data in that column. My original plan was to simply […]
- Django & South: Custom field methods are not executed when doing obj.save() in a data migration In my Django model I have two fields, name (a regular CharField) and slug, a custom field that generates the slug based on a field name passed in the field definition, in this case I use […]
- Django South – table already exists I am trying to get started with South.
I had an existing database.
I added South (syncdb, schemamigration --initial).
I updated models.py to add a field.
I ran ./manage.py […]
- No Such Column Error in Django App After South Migration I've run into the same issue presented by the commenter here: Django South - table already exists
There was no follow-up, so I thought I'd post a new question. I have a Django app whose […]
- Backwards migration with Django South Ok, so this seems like a really silly thing to ask, and I'm sure I'm missing something somewhere.
How do you perform a backwards migration using South on Django?
So I've tweaked my […]
- Testing Django apps that use South migrations I'm trying to create some Functional tests for a Django app that uses South migrations.
Eventually, I will also be creating Twill tests.
When I try to run the existing tests, the test […]
- Django south migration – Adding FULLTEXT indexes I need to add a FULLTEXT index to one of my Django model's fields and understand that there is no built in functionality to do this and that such an index must be added manually in mysql […]