I have to update the auth.user records in a Django app to flip the “is_staff” bit for certain users. I could do this with a SQL script, but it’d be a lot more convenient if I could use a South data migration.
However, whenever I try to do manage.py datamigration auth whatever South creates the migration in lib/python2.7/site-packages/django/contrib/auth/migrations. Does this mean that it’s impossible to use South data migrations to migrate user data? Or is there some sort of workaround I’m missing?
Yes this is possible using the
SOUTH_MIGRATION_MODULESsetting: http://south.readthedocs.org/en/0.7.6/settings.html#south-migration-modulesFor example