Ticket #934 (closed defect: duplicate)
south does not update model permissions
|Reported by:||alan.kesselmann@…||Owned by:||andrew|
i have encountered a problem when south updates database only when model itself has changed - but when you only change its (models) permissions, then those do not get updated.
INSTALLED_APPS = (
'cms', #django-cms apps start
'publisher', #django-cms apps end
'south', #database schema migrations
'guardian', #object based permissions
'rosetta', #.po files translations
and so on...
setup includes 'guardian' which is https://github.com/lukaszb/django-guardian - this i use for object based permissions, but since my permissions are set up exactly like django wants them to be (https://docs.djangoproject.com/en/dev/ref/models/options/#permissions), then i dont think the case is related to 'guardian' app. Moreover - after talking to guardians creator he says that he has not encountered that problem when using django's own syncdb.
How to reproduce the problem:
- Create model. Add few fields and few permissions.
- run python manage.py schemamigration yourapp --initial
- run python manage.py migrate yourapp
- tables were created, columns were added and rows were added to auth_permission table
- add few more fields/columns to your previously created model
- add few more permissions
- run python manage.py schemamigration yourapp --auto & python manage.py migrate yourapp
- again - new fields were created and new auth_permission table rows were created - so far so good
- this time add just new permissions - make no other changes to your model.
- run python manage.py schemamigration yourapp --auto and you get :
- Nothing seems to have changed.
- run python manage.py migrate yourapp 13.
- Running migrations for yourapp:
- - Nothing to migrate.
- - Loading initial data for yourapp.
- No fixtures found.
- no new rows were created in auth_permissions table
- python manage.py syncdb does not do anything either