How to combine migrations.RunPython and migrations.RunSQL in django migration operation
I was able to figure this out by getting rid of the migrations.runSQL. I just have migrations.RunPython. From within that python forward_func I am able to access the DB and write sql there (with the necessary string interpolation) 
:)
I am trying to write a migration which grants readonly permissions to each schema in my multi-tenant postgres DB. 
The migrations run once per schema, so what I would like to do would be capture the name of the schema for which it is running, and then use that schema_name in my SQL statement to grant permissions for that schema. 
In django, I can create a migration operation called 'RunPython', and from within that python code I can determine for which schema the migrations are currently running (schema_editor.connection.connection_name). 
What I want to do is pass that information to the next migration operation, namely "RunSQL", so that the SQL I run can be:
"GRANT SELECT ON ALL TABLES IN SCHEMA {schema_name_from_python_code} TO readaccess;"
If anyone can shed any light on this issue it would be greatly appreciated. Cheers!