Merged from MOODLE_17_STABLE: fixed the journal upgrade. renaming a null column to not null is unhappy