Fix upgrade to work with Postgresql, too

Otherwise, there was the error:
```
 ** [---] Default exception handler: Error writing to database Debug: ERROR:  column "scheduler" does not exist
** [---] LINE 1: UPDATE mdl_event SET modulename = "scheduler" WHERE eventtyp...
```