Add "not null" and "default" to upgrade function (bug 1127)