From b74acce64c27228760f8a6c948e9a97a0bcaa11a Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Tue, 28 Apr 2020 13:49:23 -0400 Subject: [PATCH] fix issue with is_in_memory_db For mysql, it seems `is_in_memory_db` does not even exist. Ensure it exists before calling it. --- lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py b/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py index 047261f614..5c61d76706 100644 --- a/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py +++ b/lms/djangoapps/courseware/migrations/0011_csm_id_bigint.py @@ -15,7 +15,7 @@ class CsmBigInt(AlterField): level and the coursewarehistoryextended_studentmodulehistoryextended table is in a different database ''' def database_forwards(self, app_label, schema_editor, from_state, to_state): - if schema_editor.connection.is_in_memory_db(): + if hasattr(schema_editor.connection, 'is_in_memory_db') and schema_editor.connection.is_in_memory_db(): # sqlite3 doesn't support 'MODIFY', so skipping during tests return to_model = to_state.apps.get_model(app_label, self.model_name)