This migration instantiates the modulestore which is now dependent the xblock_django database config settings. So the initial migration for that has to run before this migration.