Nutmeg upgrade: outlines.py: "openedx.core.djangoapps.content.learning_sequences.models.LearningContext.DoesNotExist: LearningContext matching query does not exist"

Hi all,
I am upgrading from Ironwood to Nutmeg!! I found that I had to do a step by step migration through all the intermediate versions to make it work.

I had to change the default charset at the very first step to avoid a confusing IntegrityError, just after applying the sql dump to the db, and before running migrations for Juniper.

To check the default charset, run (replacing edxapp with the actual name of the db)

SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "edxapp";

If the output is not utf-8, then update with:

ALTER DATABASE edxapp CHARACTER SET utf8 COLLATE utf8_general_ci

Repeat the same with the notes and the discovery databases.

It is curious that, even if you set the charset initially in the source and the target databases, once I apply the sql dump to the target, the charset is cleared and I had to apply it afterwards.

Now, everything went fine until the final migration from Maple to Nutmeg, where I got exactly the CourseOutlineData.DoesNotExist error.

But then running tutor local run cms ./manage.py cms simulate_publish fixed the problem and everything looks fine now.

1 Like