@@ -365,6 +365,31 @@ function xmldb_coursework_upgrade($oldversion) {
365365 upgrade_mod_savepoint (true , 2026010801 , 'coursework ' );
366366 }
367367
368+ //todo debugging only - delete this
369+ if ($ oldversion < 2026022301 ) {
370+
371+ // Define table coursework_temp_logs to be created.
372+ $ table = new xmldb_table ('coursework_temp_logs ' );
373+
374+ // Adding fields to table coursework_temp_logs.
375+ $ table ->add_field ('id ' , XMLDB_TYPE_INTEGER , '10 ' , null , XMLDB_NOTNULL , XMLDB_SEQUENCE , null );
376+ $ table ->add_field ('classname ' , XMLDB_TYPE_CHAR , '255 ' , null , null , null , null );
377+ $ table ->add_field ('notes ' , XMLDB_TYPE_CHAR , '255 ' , null , null , null , null );
378+ $ table ->add_field ('stacktrace ' , XMLDB_TYPE_CHAR , '255 ' , null , null , null , null );
379+ $ table ->add_field ('timecreated ' , XMLDB_TYPE_INTEGER , '10 ' , null , null , null , null );
380+
381+ // Adding keys to table coursework_temp_logs.
382+ $ table ->add_key ('primary ' , XMLDB_KEY_PRIMARY , ['id ' ]);
383+
384+ // Conditionally launch create table for coursework_temp_logs.
385+ if (!$ dbman ->table_exists ($ table )) {
386+ $ dbman ->create_table ($ table );
387+ }
388+
389+ // Coursework savepoint reached.
390+ upgrade_mod_savepoint (true , 2026022301 , 'coursework ' );
391+ }
392+
368393 // Always needs to return true.
369394 return true ;
370395}
0 commit comments